@Target(value=FIELD) @Retention(value=RUNTIME) public @interface Convert
@Convert(XxxDateConverter.class) private Date date;// Tell ORM Tool use XxxDateConverter to do the convert @Convert(XxxEnumTranslator.class) private Enum some1;// Tell ORM Tool use XxxEnumTranslator to do the convert @Convert() private Enum some2; // Tell ORM Tool decide how to do the convert by ORM tool itself
| Modifier and Type | Optional Element and Description |
|---|---|
String |
attributeName
The
attributeName element must be specified unless the
Convert annotation is on an attribute of basic type or on an
element collection of basic type. |
Class<?> |
converter
Specifies the converter to be applied.
|
boolean |
disableConversion
Used to disable an auto-apply or inherited converter.
|
Class<?> |
value |
public abstract Class<?> value
public abstract Class<?> converter
public abstract String attributeName
attributeName element must be specified unless the
Convert annotation is on an attribute of basic type or on an
element collection of basic type. In these cases, the
attributeName element must not be specified.Copyright © 2021. All rights reserved.