Module org.eclipse.persistence.sdo
Class JAXBValueStore
java.lang.Object
org.eclipse.persistence.sdo.helper.jaxb.JAXBValueStore
- All Implemented Interfaces:
ValueStore
The JAXBValueStore enables a DataObject to access data from a POJO.
The link between an SDO property and a POJO property is through their
XML representation. For the POJO property this corresponds to its
JAXB mapping.
-
Constructor Summary
ConstructorDescriptionJAXBValueStore
(JAXBHelperContext aJAXBHelperContext, Object anEntity) JAXBValueStore
(JAXBHelperContext aJAXBHelperContext, SDOType sdoType) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Get a shallow copy of the original ValueStore.getDeclaredProperty
(int propertyIndex) Get the value from the wrapped POJO, wrapping in DataObjects as necessary.getOpenContentProperty
(Property property) void
initialize
(DataObject aDataObject) Initialize the value store with its associated DataObject.boolean
isSetDeclaredProperty
(int propertyIndex) For isMany=false properties return true if not null.boolean
isSetOpenContentProperty
(Property property) void
setDeclaredProperty
(int propertyIndex, Object value) Set the value on the underlying POJO, unwrapping values as necessary.void
setManyProperty
(Property property, Object value) void
setOpenContentProperty
(Property property, Object value) void
unsetDeclaredProperty
(int propertyIndex) For isMany=false properties set the value to null.void
unsetOpenContentProperty
(Property property)
-
Constructor Details
-
JAXBValueStore
-
JAXBValueStore
-
-
Method Details
-
initialize
Initialize the value store with its associated DataObject.- Specified by:
initialize
in interfaceValueStore
- Parameters:
aDataObject
-
-
getDeclaredProperty
Get the value from the wrapped POJO, wrapping in DataObjects as necessary.- Specified by:
getDeclaredProperty
in interfaceValueStore
-
setDeclaredProperty
Set the value on the underlying POJO, unwrapping values as necessary.- Specified by:
setDeclaredProperty
in interfaceValueStore
-
isSetDeclaredProperty
public boolean isSetDeclaredProperty(int propertyIndex) For isMany=false properties return true if not null. For collection properties return true if the collection is not empty.- Specified by:
isSetDeclaredProperty
in interfaceValueStore
-
unsetDeclaredProperty
public void unsetDeclaredProperty(int propertyIndex) For isMany=false properties set the value to null. For isMany=true set the value to an empty container of the appropriate type.- Specified by:
unsetDeclaredProperty
in interfaceValueStore
-
getOpenContentProperty
- Specified by:
getOpenContentProperty
in interfaceValueStore
-
setOpenContentProperty
- Specified by:
setOpenContentProperty
in interfaceValueStore
-
isSetOpenContentProperty
- Specified by:
isSetOpenContentProperty
in interfaceValueStore
-
unsetOpenContentProperty
- Specified by:
unsetOpenContentProperty
in interfaceValueStore
-
setManyProperty
- Specified by:
setManyProperty
in interfaceValueStore
-
copy
Description copied from interface:ValueStore
Get a shallow copy of the original ValueStore. Changes made to the copy must not impact the original ValueStore- Specified by:
copy
in interfaceValueStore
- Returns:
- ValueStore
-