Jump to: navigation, search

Difference between revisions of "EclipseLink/Release/2.4.0/JAXB RI Extensions/XML Accessor Factory"

Line 7: Line 7:
 
In the current JAXB RI, developed by Sun, there are a series of "proprietary" JAXB extensions that are available to provide advanced JAXB functionality outside of the JAXB spec (these extension classes reside in the '''com.sun.xml.bind''' package).
 
In the current JAXB RI, developed by Sun, there are a series of "proprietary" JAXB extensions that are available to provide advanced JAXB functionality outside of the JAXB spec (these extension classes reside in the '''com.sun.xml.bind''' package).
  
By providing implementations of Accessor and AccessorFactory classes, the user can provide their own logic for getting and setting property values, both at the Class and Package level.
+
By providing implementations of '''Accessor''' and '''AccessorFactory''' classes, the user can provide their own logic for getting and setting property values, both at the Class and Package level.
  
 
This document will outline EclipseLink MOXY's support to this extension.
 
This document will outline EclipseLink MOXY's support to this extension.
Line 13: Line 13:
 
= Behaviour =
 
= Behaviour =
  
 +
Classes (or packages) annotated with '''XmlAccessorFactory''' will use the supplied '''AccessorFactory''' subclass to create '''Accessors''' to set and get the values of JAXB properties.  By implementing their own '''Accessor''' classes, the user will have complete control over the setting and getting of property values.  This could be used, for example, to implement a custom lazy-loading strategy.
  
  

Revision as of 13:51, 4 June 2012

Design Documentation: XML Accessor Factory

ER 372403

In the current JAXB RI, developed by Sun, there are a series of "proprietary" JAXB extensions that are available to provide advanced JAXB functionality outside of the JAXB spec (these extension classes reside in the com.sun.xml.bind package).

By providing implementations of Accessor and AccessorFactory classes, the user can provide their own logic for getting and setting property values, both at the Class and Package level.

This document will outline EclipseLink MOXY's support to this extension.

Behaviour

Classes (or packages) annotated with XmlAccessorFactory will use the supplied AccessorFactory subclass to create Accessors to set and get the values of JAXB properties. By implementing their own Accessor classes, the user will have complete control over the setting and getting of property values. This could be used, for example, to implement a custom lazy-loading strategy.


Configuration

Examples