Top Description Methods
org.hibernate.annotations

public @Interface ColumnTransformer

extends Annotation
Annotations
@Target:FIELD, METHOD
@Retention:RUNTIME
Imports
java.lang.annotation.Retention

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: read="decrypt(credit_card_num)" write="encrypt(?)"
Author
Emmanuel Bernard

Method Summary

Modifier and TypeMethod and Description
public 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 String
read()

Custom SQL expression used to read from the column

public String
write()

Custom SQL expression used to write to the column.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

forColumnback to summary
public 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

readback to summary
public String read()

Custom SQL expression used to read from the column

writeback to summary
public String write()

Custom SQL expression used to write to the column. The write expression must contain exactly one '?' placeholder for the value.