Module org.eclipse.persistence.sdo
Class JAXBDataFactory
java.lang.Object
org.eclipse.persistence.sdo.helper.delegates.SDODataFactoryDelegate
org.eclipse.persistence.sdo.helper.jaxb.JAXBDataFactory
- All Implemented Interfaces:
DataFactory
,SDODataFactory
This implementation of commonj.sdo.helper.DataFactory is responsible for
ensuring that newly created DataObjects are assigned a JAXB aware value store.
Type customerType = jaxbHelperContext.getType(Customer.class); DataObject customerDO = jaxbHelperContext.getDataFactory().create(customerType); customerDO.set("first-name", "Jane"); Customer customer = jaxbHelperContext.unwrap(customerDO); customer.getFirstName(); // returns "Jane"
-
Field Summary
Fields inherited from interface commonj.sdo.helper.DataFactory
INSTANCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn a new DataObject of the specified Type.INTERNAL: Return the current helperContext associated with this delegate.Methods inherited from class org.eclipse.persistence.sdo.helper.delegates.SDODataFactoryDelegate
create, create, setHelperContext
-
Constructor Details
-
JAXBDataFactory
-
-
Method Details
-
getHelperContext
Description copied from class:SDODataFactoryDelegate
INTERNAL: Return the current helperContext associated with this delegate.- Specified by:
getHelperContext
in interfaceSDODataFactory
- Overrides:
getHelperContext
in classSDODataFactoryDelegate
- Returns:
-
create
Return a new DataObject of the specified Type. If a corresponding class (based on XML schema information) exists in the JAXBContext, then the returned DataObject will wrap an instance of that class.- Specified by:
create
in interfaceDataFactory
- Overrides:
create
in classSDODataFactoryDelegate
- Parameters:
type
- The Type.- Returns:
- the created DataObject.
-