EclipseLink 1.0_1.0M2 API Reference - Incubation

org.eclipse.persistence.sdo
Class DefaultValueStore

java.lang.Object
  extended by org.eclipse.persistence.sdo.DefaultValueStore
All Implemented Interfaces:
ValueStore

public class DefaultValueStore
extends java.lang.Object
implements ValueStore

Purpose:Default implementation of the ValueStore interface.

Responsibilities:


Constructor Summary
DefaultValueStore()
           
 
Method Summary
 ValueStore copy()
          Get a shallow copy of the original ValueStore.
 java.lang.Object getDeclaredProperty(int propertyIndex)
          Get declared property by index.
 java.lang.Object getOpenContentProperty(Property property)
          Get open-content property by name.
 java.util.Map getOpenContentValues()
          INTERNAL:
 boolean[] getTypePropertiesIsSetStatus()
          INTERNAL:
 java.lang.Object[] getTypePropertyValues()
          INTERNAL:
 void initialize(DataObject aDataObject)
          Perform any post-instantiation integrity operations that could not be done during ValueStore creation.
 boolean isSetDeclaredProperty(int propertyIndex)
          Get isSet boolean status for declared property by index.
 boolean isSetOpenContentProperty(Property property)
          Get isSet boolean status for open-content property by name.
 void setDeclaredProperty(int propertyIndex, java.lang.Object value)
          Set declared property by index.
 void setManyProperty(Property property, java.lang.Object value)
          Set 1-n many-valued property by name.
 void setOpenContentProperty(Property property, java.lang.Object value)
          Set open-content property by name.
 void setOpenContentValues(java.util.Map openContentValues)
          INTERNAL:
 void setTypePropertiesIsSetStatus(boolean[] typePropertiesIsSetStatusArray)
          INTERNAL:
 void setTypePropertyValues(java.lang.Object[] typePropertyValuesArray)
          Set the values for declared properties
 void unsetDeclaredProperty(int propertyIndex)
          Unset declared property by index position If the property is many-valued, the value must be an List and that list is cleared.
 void unsetOpenContentProperty(Property property)
          Unset open-content property by name If the property is many-valued, the value must be an List and that list is cleared.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultValueStore

public DefaultValueStore()
Method Detail

getDeclaredProperty

public java.lang.Object getDeclaredProperty(int propertyIndex)
Get declared property by index.
Returns the value of the given property of this object.
If the property is many-valued, the result will be a ListWrapper and each object in the List will be an instance of the property's type. Otherwise the result will directly be an instance of the property's type.

Specified by:
getDeclaredProperty in interface ValueStore
Parameters:
propertyIndex - the property index of the value to fetch.
Returns:
the value of the given property of the object.
See Also:
#setDeclaredProperty(Property, Object), #unsetDeclaredProperty(Property), #isSetDeclaredProperty(Property)

getOpenContentProperty

public java.lang.Object getOpenContentProperty(Property property)
Get open-content property by name.
Returns the value of the given property of this object.
If the property is many-valued, the result will be a ListWrapper and each object in the List will be an instance of the property's type. Otherwise the result will directly be an instance of the property's type.

Specified by:
getOpenContentProperty in interface ValueStore
Parameters:
property - the property to fetch the value of.
Returns:
the value of the given property of the object.
See Also:
ValueStore.setOpenContentProperty(Property, Object), ValueStore.unsetOpenContentProperty(Property), ValueStore.isSetOpenContentProperty(Property)

setDeclaredProperty

public void setDeclaredProperty(int propertyIndex,
                                java.lang.Object value)
Set declared property by index.
Sets the value of the given property of the object to the new value.

If the property is many-valued, the new value must be a List and each object in that list must be an instance of the property's type; the existing contents are cleared and the contents of the new value are added. Otherwise the new value directly must be an instance of the property's type and it becomes the new value of the property of the object.

Specified by:
setDeclaredProperty in interface ValueStore
Parameters:
propertyIndex - the property name of the value to set.
value - the new value for the property.s
See Also:
#unsetDeclaredProperty(Property), #isSetDeclaredProperty(Property), #getDeclaredProperty(Property)

setOpenContentProperty

public void setOpenContentProperty(Property property,
                                   java.lang.Object value)
Set open-content property by name.
Sets the value of the given property of the object to the new value.

If the property is many-valued, the new value must be a List and each object in that list must be an instance of the property's type; the existing contents are cleared and the contents of the new value are added. Otherwise the new value directly must be an instance of the property's type and it becomes the new value of the property of the object.

Specified by:
setOpenContentProperty in interface ValueStore
Parameters:
property - the property to be set.
value - the new value for the property.
See Also:
ValueStore.unsetOpenContentProperty(Property), ValueStore.isSetOpenContentProperty(Property), ValueStore.getOpenContentProperty(Property)

isSetDeclaredProperty

public boolean isSetDeclaredProperty(int propertyIndex)
Get isSet boolean status for declared property by index.
Returns whether the property of the object is considered to be set.

isSet() for many-valued Properties returns true if the List is not empty and false if the List is empty. For single-valued Properties:

Specified by:
isSetDeclaredProperty in interface ValueStore
Parameters:
propertyIndex - the property index in question.
Returns:
whether the property of the object is set.
See Also:
#setDeclaredProperty(String, Object), #unsetDeclaredProperty(String), #getDeclaredProperty(String)

isSetOpenContentProperty

public boolean isSetOpenContentProperty(Property property)
Get isSet boolean status for open-content property by name.
Returns whether the property of the object is considered to be set.

isSet() for many-valued Properties returns true if the List is not empty and false if the List is empty. For single-valued Properties:

Specified by:
isSetOpenContentProperty in interface ValueStore
Parameters:
property - the property in question.
Returns:
whether the property of the object is set.
See Also:
#setOpenContentProperty(String, Object), #unsetOpenContentProperty(String), #getOpenContentProperty(String)

unsetDeclaredProperty

public void unsetDeclaredProperty(int propertyIndex)
Unset declared property by index position

If the property is many-valued, the value must be an List and that list is cleared. Otherwise, the value of the property of the object is set to the property's default value. The property will no longer be considered set.

Specified by:
unsetDeclaredProperty in interface ValueStore
Parameters:
propertyIndex -
See Also:
isSetDeclaredProperty(int), setDeclaredProperty(int, Object), getDeclaredProperty(int)

unsetOpenContentProperty

public void unsetOpenContentProperty(Property property)
Unset open-content property by name

If the property is many-valued, the value must be an List and that list is cleared. Otherwise, the value of the property of the object is set to the property's default value. The property will no longer be considered set.

Specified by:
unsetOpenContentProperty in interface ValueStore
Parameters:
property -
See Also:
isSetDeclaredProperty(int), setDeclaredProperty(int, Object), getDeclaredProperty(int)

initialize

public void initialize(DataObject aDataObject)
Perform any post-instantiation integrity operations that could not be done during ValueStore creation.
Since the dataObject reference passed in may be bidirectional or self-referencing - we cannot set this variable until the dataObject itself is finished instantiation - hence the 2-step initialization.

Specified by:
initialize in interface ValueStore
Parameters:
dataObject -

setTypePropertyValues

public void setTypePropertyValues(java.lang.Object[] typePropertyValuesArray)
Set the values for declared properties

Parameters:
typePropertyValuesArray -

setTypePropertiesIsSetStatus

public void setTypePropertiesIsSetStatus(boolean[] typePropertiesIsSetStatusArray)
INTERNAL:

Parameters:
typePropertiesIsSetStatusArray - boolean[] of isSet values for declared properties

getTypePropertyValues

public java.lang.Object[] getTypePropertyValues()
INTERNAL:

Returns:
Object[] of the values of declared properties

getTypePropertiesIsSetStatus

public boolean[] getTypePropertiesIsSetStatus()
INTERNAL:

Returns:
boolean[] of isSet values for declared properties

setOpenContentValues

public void setOpenContentValues(java.util.Map openContentValues)
INTERNAL:

Parameters:
Map - openContentValues

getOpenContentValues

public java.util.Map getOpenContentValues()
INTERNAL:

Returns:
Map of values for open content properties

setManyProperty

public void setManyProperty(Property property,
                            java.lang.Object value)
Description copied from interface: ValueStore
Set 1-n many-valued property by name.
This function is implemented by ValueStores that maintain separate wrapped-caching and storage of property values.

Specified by:
setManyProperty in interface ValueStore

copy

public ValueStore copy()
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

EclipseLink 1.0_1.0M2 API Reference - Incubation