Top Description Fields Methods
org.eclipse.persistence.annotations

public @Interface Convert

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

The Convert annotation specifies that a named converter should be used with the corresponding mapped attribute. The Convert annotation has the following reserved names: When these reserved converters are not used, it is necessary to define a converter to use using the @Converter annotation.
Author
Guy Pelletier
Since
Oracle TopLink 11.1.1.0.0
See Also
org.eclipse.persistence.annotations.Converter, org.eclipse.persistence.annotations.ObjectTypeConverter, org.eclipse.persistence.annotations.TypeConverter, org.eclipse.persistence.mappings.converters.SerializedObjectConverter, org.eclipse.persistence.mappings.converters.ClassInstanceConverter

Field Summary

Modifier and TypeField and Description
public static final String
CLASS_INSTANCE

Constant name for the reserved class instance converter.

public static final String
JSON

Constant name for the reserved JSON converter.

public static final String
KRYO

Constant name for the reserved Kryo converter.

public static final String
NONE

Constant name for no converter.

public static final String
SERIALIZED

Constant name for the reserved Java serialization converter.

public static final String
XML

Constant name for the reserved XML converter.

Method Summary

Modifier and TypeMethod and Description
public String
value()

(Optional) The name of the converter to be used.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Field Detail

CLASS_INSTANCEback to summary
public static final String CLASS_INSTANCE

Constant name for the reserved class instance converter. This will store the object's class name, and create a new instance of the class on read.

JSONback to summary
public static final String JSON

Constant name for the reserved JSON converter. This will use EclipseLink Moxy JAXB to convert the object to and from JSON.

KRYOback to summary
public static final String KRYO

Constant name for the reserved Kryo converter. This will use Kryo to convert the object to and from an optimized binary format.

NONEback to summary
public static final String NONE

Constant name for no converter.

SERIALIZEDback to summary
public static final String SERIALIZED

Constant name for the reserved Java serialization converter. This will serialize the

XMLback to summary
public static final String XML

Constant name for the reserved XML converter. This will use JAXB to convert the object to and from XML.

Method Detail

valueback to summary
public String value()

(Optional) The name of the converter to be used.