Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Default Conversions and Converters"

m (Default Conversions and Converters)
m (Default Conversions and Converters)
Line 1: Line 1:
 
=Default Conversions and Converters=
 
=Default Conversions and Converters=
EclipseLink defines the following converter annotations (in addition to JPA-defined ones):
+
EclipseLink defines the following converter annotations and XML attributes (in addition to JPA-defined ones):
  
* <tt>[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Default_Conversions_and_Converters/Converter|@Converter]]</tt>
+
* <tt>[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Default_Conversions_and_Converters/Converter|@Converter and <converter>]]</tt>
* <tt>[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Default_Conversions_and_Converters/TypeConverter|@TypeConverter]]</tt>
+
* <tt>[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Default_Conversions_and_Converters/TypeConverter|@TypeConverter and <type-converter>]]</tt>
* <tt>[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Default_Conversions_and_Converters/ObjectTypeConverter|@ObjectTYpeConverter]]</tt>
+
* <tt>[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Default_Conversions_and_Converters/ObjectTypeConverter|@ObjectTypeConverter and <object-type-converter>]]</tt>
* <tt>[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Default_Conversions_and_Converters/StructConverter|@StructConverter]]</tt>
+
* <tt>[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Default_Conversions_and_Converters/StructConverter|@StructConverter and <struct-converter>]]</tt>
* <tt>[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Default_Conversions_and_Converters/Convert|@Convert]]</tt>
+
* <tt>[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Default_Conversions_and_Converters/Convert|@Convert and <convert>]]</tt>
  
 
EclipseLink persistence provider searches the converter annotations in the following order:
 
EclipseLink persistence provider searches the converter annotations in the following order:

Revision as of 15:17, 17 June 2010

Default Conversions and Converters

EclipseLink defines the following converter annotations and XML attributes (in addition to JPA-defined ones):

EclipseLink persistence provider searches the converter annotations in the following order:

You can define converters at the class, field and property level. You can specify EclipseLink converters on the following classes:

  • @Entity
Elug javaspec icon.gif

For more information, see Section 8.1 "Entity" in the JPA Specification.

You can use EclipseLink converters with the following mappings:

If you specify a converter with any other type of mapping annotation, EclipseLink will throw an exception.


Eclipselink-logo.gif
Version: 2.1.0
Other versions...

Back to the top