Module eclipselink
Annotation Interface ObjectTypeConverter
@Target({TYPE,METHOD,FIELD})
@Retention(RUNTIME)
@Repeatable(ObjectTypeConverters.class)
public @interface ObjectTypeConverter
The ObjectTypeConverter annotation is used to specify a
ObjectTypeConverter that converts a fixed
number of database data value(s) to Java object value(s) during the reading
and writing of a mapped attribute
An ObjectTypeConverter must be uniquely identified by name and can be defined at the class, field and property level and can be specified within an Entity, MappedSuperclass and Embeddable class.
The usage of an ObjectTypeConverter is specified via the Convert annotation and is supported on a Basic, or ElementCollection mapping.
- See Also:
- Author:
- Guy Pelletier
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionSpecify the conversion values to be used with the object converter.The name of this converter. -
Optional Element Summary
Optional Elements
-
Element Details
-
name
String nameThe name of this converter. The name should be unique across the whole persistence unit. -
dataType
Class<?> dataTypeSpecify the type stored on the database.The default is inferred from the type of the persistence field or property.
- Default:
void.class
-
objectType
Class<?> objectTypeSpecify the type stored on the entity.The default is inferred from the type of the persistent field or property.
- Default:
void.class
-
conversionValues
ConversionValue[] conversionValuesSpecify the conversion values to be used with the object converter. -
defaultObjectValue
String defaultObjectValueSpecify a default object value. Used for legacy data if the data value is missing.- Default:
""
-