@Target(value={FIELD,METHOD}) @Retention(value=RUNTIME) @Repeatable(value=ColumnTransformers.class) public @interface ColumnTransformer
Custom SQL expression used to read the value from and write a value to a column. Use for direct object loading/saving as well as queries. The write expression must contain exactly one '?' placeholder for the value.
For example: <code>read="decrypt(credit_card_num)" write="encrypt(?)"</code>
ColumnTransformers
public abstract String forColumn
(Logical) column name for which the expression is used.
This can be left out if the property is bound to a single column
public abstract String read
Custom SQL expression used to read from the column.
public abstract String write
Custom SQL expression used to write to the column. The write expression must contain exactly one '?' placeholder for the value.
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.