Module org.eclipse.persistence.sdo
Class JAXBValueStore
- java.lang.Object
-
- org.eclipse.persistence.sdo.helper.jaxb.JAXBValueStore
-
- All Implemented Interfaces:
ValueStore
public class JAXBValueStore extends Object implements 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
Constructors Constructor Description JAXBValueStore(JAXBHelperContext aJAXBHelperContext, Object anEntity)JAXBValueStore(JAXBHelperContext aJAXBHelperContext, SDOType sdoType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueStorecopy()Get a shallow copy of the original ValueStore.ObjectgetDeclaredProperty(int propertyIndex)Get the value from the wrapped POJO, wrapping in DataObjects as necessary.ObjectgetOpenContentProperty(Property property)voidinitialize(DataObject aDataObject)Initialize the value store with its associated DataObject.booleanisSetDeclaredProperty(int propertyIndex)For isMany=false properties return true if not null.booleanisSetOpenContentProperty(Property property)voidsetDeclaredProperty(int propertyIndex, Object value)Set the value on the underlying POJO, unwrapping values as necessary.voidsetManyProperty(Property property, Object value)voidsetOpenContentProperty(Property property, Object value)voidunsetDeclaredProperty(int propertyIndex)For isMany=false properties set the value to null.voidunsetOpenContentProperty(Property property)
-
-
-
Constructor Detail
-
JAXBValueStore
public JAXBValueStore(JAXBHelperContext aJAXBHelperContext, SDOType sdoType)
-
JAXBValueStore
public JAXBValueStore(JAXBHelperContext aJAXBHelperContext, Object anEntity)
-
-
Method Detail
-
initialize
public void initialize(DataObject aDataObject)
Initialize the value store with its associated DataObject.- Specified by:
initializein interfaceValueStore
-
getDeclaredProperty
public Object getDeclaredProperty(int propertyIndex)
Get the value from the wrapped POJO, wrapping in DataObjects as necessary.- Specified by:
getDeclaredPropertyin interfaceValueStore
-
setDeclaredProperty
public void setDeclaredProperty(int propertyIndex, Object value)Set the value on the underlying POJO, unwrapping values as necessary.- Specified by:
setDeclaredPropertyin 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:
isSetDeclaredPropertyin 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:
unsetDeclaredPropertyin interfaceValueStore
-
getOpenContentProperty
public Object getOpenContentProperty(Property property)
- Specified by:
getOpenContentPropertyin interfaceValueStore
-
setOpenContentProperty
public void setOpenContentProperty(Property property, Object value)
- Specified by:
setOpenContentPropertyin interfaceValueStore
-
isSetOpenContentProperty
public boolean isSetOpenContentProperty(Property property)
- Specified by:
isSetOpenContentPropertyin interfaceValueStore
-
unsetOpenContentProperty
public void unsetOpenContentProperty(Property property)
- Specified by:
unsetOpenContentPropertyin interfaceValueStore
-
setManyProperty
public void setManyProperty(Property property, Object value)
- Specified by:
setManyPropertyin interfaceValueStore
-
copy
public ValueStore copy()
Description copied from interface:ValueStoreGet a shallow copy of the original ValueStore. Changes made to the copy must not impact the original ValueStore- Specified by:
copyin interfaceValueStore- Returns:
- ValueStore
-
-