Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.sdo.helper.jaxb
Class JAXBValueStore

java.lang.Object
  extended by org.eclipse.persistence.sdo.helper.jaxb.JAXBValueStore

All Implemented Interfaces:
ValueStore

public class JAXBValueStore
extends java.lang.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.


Field Summary
private  SDODataObject dataObject
           
private  XMLDescriptor descriptor
           
private  java.lang.Object entity
           
private  JAXBHelperContext jaxbHelperContext
           
private  java.util.Map<Property,JAXBListWrapper> listWrappers
           

 

Constructor Summary
  JAXBValueStore(JAXBHelperContext aJAXBHelperContext, java.lang.Object anEntity)
           
private JAXBValueStore(JAXBHelperContext aJAXBHelperContext, java.lang.Object anEntity, XMLDescriptor aDescriptor, SDODataObject aDataObject, java.util.Map<Property,JAXBListWrapper> aMap)
           
  JAXBValueStore(JAXBHelperContext aJAXBHelperContext, SDOType sdoType)
           

 

Method Summary
 ValueStore copy()
          Get a shallow copy of the original ValueStore.
(package private)  SDODataObject getDataObject()
          Return the DataObject associated with this value store.
 java.lang.Object getDeclaredProperty(int propertyIndex)
          Get the value from the wrapped POJO, wrapping in DataObjects as necessary.
(package private)  java.lang.Object getEntity()
          Return the POJO associated with this value store.
(package private)  XMLDescriptor getEntityDescriptor()
          Return the XMLDescriptor associated with this value store.
(package private)  JAXBHelperContext getJAXBHelperContext()
          Return the JAXBHelperContext.
(package private)  DatabaseMapping getJAXBMappingForProperty(SDOProperty sdoProperty)
          Return the JAXB mapping for the SDO property.
 java.lang.Object 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, java.lang.Object value)
          Set the value on the underlying POJO, unwrapping values as necessary.
 void setManyProperty(Property property, java.lang.Object value)
           
 void setOpenContentProperty(Property property, java.lang.Object value)
           
 void unsetDeclaredProperty(int propertyIndex)
          For isMany=false properties set the value to null.
 void unsetOpenContentProperty(Property property)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

jaxbHelperContext

private JAXBHelperContext jaxbHelperContext

entity

private java.lang.Object entity

descriptor

private XMLDescriptor descriptor

dataObject

private SDODataObject dataObject

listWrappers

private java.util.Map<Property,JAXBListWrapper> listWrappers

Constructor Detail

JAXBValueStore

public JAXBValueStore(JAXBHelperContext aJAXBHelperContext,
                      SDOType sdoType)

JAXBValueStore

public JAXBValueStore(JAXBHelperContext aJAXBHelperContext,
                      java.lang.Object anEntity)

JAXBValueStore

private JAXBValueStore(JAXBHelperContext aJAXBHelperContext,
                       java.lang.Object anEntity,
                       XMLDescriptor aDescriptor,
                       SDODataObject aDataObject,
                       java.util.Map<Property,JAXBListWrapper> aMap)

Method Detail

getDataObject

SDODataObject getDataObject()
Return the DataObject associated with this value store.

getEntity

java.lang.Object getEntity()
Return the POJO associated with this value store.

getEntityDescriptor

XMLDescriptor getEntityDescriptor()
Return the XMLDescriptor associated with this value store. This is the XMLDescriptor for the associated POJO.

getJAXBHelperContext

JAXBHelperContext getJAXBHelperContext()
Return the JAXBHelperContext. This is the JAXBHelperContext used to create the DataObject.

initialize

public void initialize(DataObject aDataObject)
Initialize the value store with its associated DataObject.
Specified by:
initialize in interface ValueStore

getDeclaredProperty

public java.lang.Object getDeclaredProperty(int propertyIndex)
Get the value from the wrapped POJO, wrapping in DataObjects as necessary.
Specified by:
getDeclaredProperty in interface ValueStore

setDeclaredProperty

public void setDeclaredProperty(int propertyIndex,
                                java.lang.Object value)
Set the value on the underlying POJO, unwrapping values as necessary.
Specified by:
setDeclaredProperty in interface ValueStore

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 interface ValueStore

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 interface ValueStore

getOpenContentProperty

public java.lang.Object getOpenContentProperty(Property property)
Specified by:
getOpenContentProperty in interface ValueStore

setOpenContentProperty

public void setOpenContentProperty(Property property,
                                   java.lang.Object value)
Specified by:
setOpenContentProperty in interface ValueStore

isSetOpenContentProperty

public boolean isSetOpenContentProperty(Property property)
Specified by:
isSetOpenContentProperty in interface ValueStore

unsetOpenContentProperty

public void unsetOpenContentProperty(Property property)
Specified by:
unsetOpenContentProperty in interface ValueStore

setManyProperty

public void setManyProperty(Property property,
                            java.lang.Object value)
Specified by:
setManyProperty in interface ValueStore

copy

public ValueStore 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 interface ValueStore
Returns:
ValueStore

getJAXBMappingForProperty

DatabaseMapping getJAXBMappingForProperty(SDOProperty sdoProperty)
Return the JAXB mapping for the SDO property. They are matched on their XML schema representation.

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.