Class 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.
    • Constructor Detail

      • JAXBValueStore

        public JAXBValueStore​(JAXBHelperContext aJAXBHelperContext,
                              java.lang.Object anEntity)
    • Method Detail

      • initialize

        public void initialize​(commonj.sdo.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​(commonj.sdo.Property property)
        Specified by:
        getOpenContentProperty in interface ValueStore
      • setOpenContentProperty

        public void setOpenContentProperty​(commonj.sdo.Property property,
                                           java.lang.Object value)
        Specified by:
        setOpenContentProperty in interface ValueStore
      • setManyProperty

        public void setManyProperty​(commonj.sdo.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