Jump to: navigation, search

Difference between revisions of "EclipseLink/UserGuide/JPA/Advanced JPA Development/Customizers"

(New page: {{EclipseLink_UserGuide |info=y |toc=n |eclipselink=y |eclipselinktype=JPA |nativeapi=y |nativeapis= *[http://www.eclipse.org/eclipselink/api/latest/org/eclipse/persistence/descriptors/pac...)
 
Line 6: Line 6:
 
|nativeapi=y
 
|nativeapi=y
 
|nativeapis=
 
|nativeapis=
*[http://www.eclipse.org/eclipselink/api/latest/org/eclipse/persistence/descriptors/package-frame.html descriptors package]}}
+
*[http://www.eclipse.org/eclipselink/api/latest/org/eclipse/persistence/descriptors/package-frame.html descriptors package]
 +
*[http://www.eclipse.org/eclipselink/api/latest/org/eclipse/persistence/mappings/package-frame.html mappings package]
 +
*[http://www.eclipse.org/eclipselink/api/latest/org/eclipse/persistence/sessions/package-frame.html sessions package]}}
  
 
=Customizers=
 
=Customizers=
Line 14: Line 16:
 
* DescriptorCustomizer : defines an interface to customize the mapping meta-data for a class.
 
* DescriptorCustomizer : defines an interface to customize the mapping meta-data for a class.
 
* SessionCustomizer : defines an interface to customize the meta-data for a persistence unit, or a set of its classes.
 
* SessionCustomizer : defines an interface to customize the meta-data for a persistence unit, or a set of its classes.
 +
 +
==DescriptorCustomizer==
 +
DescriptorCustomizer is an interface that allows the customization of a class' meta-data through Java code.  The interface defines a single <code>customize(ClassDescriptor)</code> method.  A <code>ClassDescriptor</code> represents the meta-data for a class.  The actually descriptor will be either a <code>RelationalDescriptor</code> for relational data or an <code>EISDescriptor</code> for NoSQL data.
  
 
{{EclipseLink_JPA
 
{{EclipseLink_JPA

Revision as of 12:48, 3 May 2012

EclipseLink JPA


Customizers

EclipseLink allows extended configuration of the ORM meta-data through Java code. EclipseLink provides a descriptor and mapping API that allows its meta-data to be accessed and configured through Java code. EclipseLink also provides a session API that allows the persistence unit meta-data to be accessed and configured through Jacva code. The APIs allows access to certain extended features not provided through annotations or XML. They also allow usage of custom extensions, allow configurations that are only possible through code, and allow easier configuration of defaults or computed configurations.

EclipseLink provides two types of customizers:

  • DescriptorCustomizer : defines an interface to customize the mapping meta-data for a class.
  • SessionCustomizer : defines an interface to customize the meta-data for a persistence unit, or a set of its classes.

DescriptorCustomizer

DescriptorCustomizer is an interface that allows the customization of a class' meta-data through Java code. The interface defines a single customize(ClassDescriptor) method. A ClassDescriptor represents the meta-data for a class. The actually descriptor will be either a RelationalDescriptor for relational data or an EISDescriptor for NoSQL data.

Eclipselink-logo.gif
Version: 2.4.0 DRAFT
Other versions...