Top Description Methods
org.eclipse.persistence.annotations

public @Interface Converter

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

A Converter is used to customize the values during the reading from the database into the object model as well as during the writing back of changes into the database. This annotation allows developers to define a named converter that can be used in their mappings. A converter can be defined on an entity class, method, or field. A Converter must be 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 a Converter is always specified via the Convert annotation and is supported on a Basic, or ElementCollection mapping.
Author
Guy Pelletier
Since
Oracle TopLink 11.1.1.0.0
See Also
org.eclipse.persistence.annotations.Convert

Method Summary

Modifier and TypeMethod and Description
public Class<?>
converterClass()

(Required) The converter class to be used.

public String
name()

(Required) Name this converter.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

converterClassback to summary
public Class<?> converterClass()

(Required) The converter class to be used. This class must implement the org.eclipse.persistence.mappings.converters.Converter interface.

nameback to summary
public String name()

(Required) Name this converter. The name should be unique across the whole persistence unit.