Skip navigation links

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

E28847-01


org.eclipse.persistence.sdo
Class SDODataObject

java.lang.Object
  extended by org.eclipse.persistence.sdo.SDODataObject

All Implemented Interfaces:
SequencedObject
Direct Known Subclasses:
OpenSequencedTypeImpl, SDOPropertyType.PropertyImpl, SDOTypeType.TypeImpl, SDOWrapperType.BooleanObjectWrapperImpl, SDOWrapperType.BooleanWrapperImpl, SDOWrapperType.ByteObjectWrapperImpl, SDOWrapperType.Bytes_hexBunaryWrapperImpl, SDOWrapperType.BytesWrapperImpl, SDOWrapperType.ByteWrapperImpl, SDOWrapperType.CharacterObjectWrapperImpl, SDOWrapperType.CharacterWrapperImpl, SDOWrapperType.DateTimeWrapperImpl, SDOWrapperType.DateWrapperImpl, SDOWrapperType.DayWrapperImpl, SDOWrapperType.DecimalWrapperImpl, SDOWrapperType.DoubleObjectWrapperImpl, SDOWrapperType.DoubleWrapperImpl, SDOWrapperType.DurationWrapperImpl, SDOWrapperType.FloatObjectWrapperImpl, SDOWrapperType.FloatWrapperImpl, SDOWrapperType.IntegerWrapperImpl, SDOWrapperType.IntObjectWrapperImpl, SDOWrapperType.IntWrapperImpl, SDOWrapperType.LongObjectWrapperImpl, SDOWrapperType.LongWrapperImpl, SDOWrapperType.MonthDayWrapperImpl, SDOWrapperType.MonthWrapperImpl, SDOWrapperType.ObjectWrapperImpl, SDOWrapperType.ShortObjectWrapperImpl, SDOWrapperType.ShortWrapperImpl, SDOWrapperType.StringsWrapperImpl, SDOWrapperType.StringWrapperImpl, SDOWrapperType.TimeWrapperImpl, SDOWrapperType.URI_QNameWrapperImpl, SDOWrapperType.URIWrapperImpl, SDOWrapperType.YearMonthDayWrapperImpl, SDOWrapperType.YearMonthWrapperImpl, SDOWrapperType.YearWrapperImpl

public class SDODataObject
extends java.lang.Object
implements SequencedObject

Field Summary
private  HelperContext aHelperContext
          hold the current context containing all helpers so that we can preserve inter-helper relationships
private  SDOChangeSummary changeSummary
           
private  SDODataObject container
           
private  java.lang.String containmentPropertyName
           
private  ValueStore currentValueStore
          The (currentValueStore) will maintain the current state of our model after logged changes - it is a shallow copy of the original, progressively becoming deeper with changes.
private  DataGraph dataGraph
           
private  java.util.List<SDOProperty> instanceProperties
           
private  java.util.Map openContentAliasNames
           
private  java.util.List openContentProperties
           
private  java.util.List openContentPropertiesAttributes
           
private  java.lang.String sdoRef
           
private  SDOSequence sequence
           
private  java.lang.String text
          Unique hash ID of this Externalizable class - not required at this point because we serialize the xml representation
private  SDOType type
          The Type that this DataObject represents

 

Constructor Summary
SDODataObject()
          INTERNAL: Private constructor.

 

Method Summary
 java.lang.String _getContainmentPropertyName()
          INTERNAL: Return the name of the Property of the DataObject containing this data object or null if there is no container.
 ValueStore _getCurrentValueStore()
          INTERNAL: Map interface into the currentValueStore of this DataObject.
private  java.util.Map<java.lang.String,Property> _getOpenContentAliasNamesMap()
           
 java.util.List _getOpenContentProperties()
          INTERNAL: Returns a list of the Properties currently used in this DataObject which are not included in getType().getProperties
 java.util.List _getOpenContentPropertiesAttributes()
           
 java.util.Map _getOpenContentPropertiesAttributesMap()
           
 java.util.List _getOpenContentPropertiesWithXMLRoots()
          INTERNAL: This function is implemented by SDOType.setOpen() in a mapping setGet/SetMethodName call
 java.lang.String _getPath()
          INTERNAL: Return an SDO Path string from root of the caller to itself
 java.lang.String _getSdoRef()
          INTERNAL: Return the sdoref attribute value during unmarshaling
 void _setChangeSummary(SDOChangeSummary aChangeSummary)
          INTERNAL: Recursively Set this DataObject's ChangeSummary as passed in value.
 void _setContainer(DataObject aContainer)
          INTERNAL: Sets the DataObject which contains this DataObject.
 void _setContainmentPropertyName(java.lang.String aContainmentPropertyName)
          INTERNAL: Sets the name of the property on the containing DataObject which contains this DataObject as a value.
 void _setCreated(boolean created)
          INTERNAL: Set flag created value.
 void _setCurrentValueStore(ValueStore aValueStore)
          INTERNAL: Pluggable Interface for substituting the default Map with a custom Map Class
private  void _setDeleted(boolean deleted)
          INTERNAL: Set flag deleted value.
 void _setHelperContext(HelperContext aContext)
          INTERNAL: Set the HelperContext that will be associated with this DataObject.
 void _setModified(boolean modified)
          INTERNAL: Set flag modified value.
 void _setOpenContentPropertiesAttributes(java.util.List openContentPropertiesAttributes)
           
 void _setOpenContentPropertiesAttributesMap(java.util.Map openAttributeProperties)
           
 void _setOpenContentPropertiesWithXMLRoots(java.util.List openContentPropertiesWithXMLRoots)
          INTERNAL: This function is implemented by SDOType.setOpen() in a mapping setGet/SetMethodName call
 void _setSdoRef(java.lang.String newRef)
           
 void _setType(Type aType)
          INTERNAL:
 void addOpenContentProperty(Property property)
          INTERNAL: Add the open content property into all 3 data structures.
 java.lang.Object convertObjectToValue(Property property, java.lang.Class cls)
          INTERNAL:
 java.lang.Object convertObjectToValue(Property property, int position, java.lang.Class cls)
          INTERNAL:
private  void convertValueAndSet(Property property, java.lang.Object originalValue)
          INTERNAL:
 SDODataObject createDataObject(int propertyIndex)
           
 SDODataObject createDataObject(int propertyIndex, java.lang.String namespaceURI, java.lang.String typeName)
           
 SDODataObject createDataObject(Property aProperty)
           
 SDODataObject createDataObject(Property property, Type aType)
           
 DataObject createDataObject(java.lang.String propertyName)
           
 SDODataObject createDataObject(java.lang.String propertyName, java.lang.String namespaceURI, java.lang.String typeName)
           
private  SDOProperty createNewProperty(java.lang.String propertyName, java.lang.String propertyUri, Type theType)
           
 Property defineOpenContentProperty(java.lang.String name, java.lang.Object value)
          INTERNAL: Create a dynamic open content property if no property exists for (name).
 Property defineOpenContentProperty(java.lang.String name, java.lang.Object value, Type sdotype)
           
 void delete()
           
private  void deleteWithSequenceUpdate()
          INTERNAL: Perform a detach action that originated from a delete and update the sequence.
 void detach()
           
private  void detach(boolean fromDelete, boolean updateSequence)
          INTERNAL: Removes this DataObject from its container, if any.
private  void detach(Property property, java.lang.Object oldValue)
          INTERNAL: Perform a detach on a DataObject or List of DataObjects
private  void detachDeleteRecursivePrivate(boolean fromDelete, boolean clearCS, boolean isRootOfRecursiveLoop)
          INTERNAL: Recursively walk the tree and set oldSettings for a detached/deleted object.
private  void detachDeleteRecursivePrivateHelper(SDODataObject aDataObject, boolean fromDelete, boolean clearCS)
          INTERNAL: Call detach or delete recursively on aDataObject after possibly changing the flag whether to clear the ChangeSummary pointer at this level
 void detachOrDelete(boolean fromDelete)
          INTERNAL: Recursively walk the tree and set oldSettings for a detached/deleted object.
private  void detachWithSequenceUpdate()
          INTERNAL: Perform a detach action that originated from a detach and update the sequence.
 java.lang.Object get(int propertyIndex)
           
 java.lang.Object get(Property property)
           
 java.lang.Object get(java.lang.String path)
           
 java.math.BigDecimal getBigDecimal(int propertyIndex)
           
 java.math.BigDecimal getBigDecimal(Property property)
           
 java.math.BigDecimal getBigDecimal(java.lang.String path)
           
 java.math.BigInteger getBigInteger(int propertyIndex)
           
 java.math.BigInteger getBigInteger(Property property)
           
 java.math.BigInteger getBigInteger(java.lang.String path)
           
 boolean getBoolean(int propertyIndex)
           
 boolean getBoolean(Property property)
           
 boolean getBoolean(java.lang.String path)
           
 byte getByte(int propertyIndex)
           
 byte getByte(Property property)
           
 byte getByte(java.lang.String path)
           
 byte[] getBytes(int propertyIndex)
           
 byte[] getBytes(Property property)
           
 byte[] getBytes(java.lang.String path)
           
 SDOChangeSummary getChangeSummary()
           
 char getChar(int propertyIndex)
           
 char getChar(Property property)
           
 char getChar(java.lang.String path)
           
 SDODataObject getContainer()
           
 SDOProperty getContainmentProperty()
           
 DataGraph getDataGraph()
           
 SDODataObject getDataObject(int propertyIndex)
           
 SDODataObject getDataObject(Property property)
           
 SDODataObject getDataObject(java.lang.String path)
           
 java.util.Date getDate(int propertyIndex)
           
 java.util.Date getDate(Property property)
           
 java.util.Date getDate(java.lang.String path)
           
 double getDouble(int propertyIndex)
           
 double getDouble(Property property)
           
 double getDouble(java.lang.String path)
           
 float getFloat(int propertyIndex)
           
 float getFloat(Property property)
           
 float getFloat(java.lang.String path)
           
 java.util.List getInstanceProperties()
           
private  SDOProperty[] getInstancePropertiesArray()
          INTERNAL:
 SDOProperty getInstanceProperty(int propertyIndex)
          INTERNAL:
 SDOProperty getInstanceProperty(java.lang.String propertyName)
           
(package private)  SDOProperty getInstanceProperty(java.lang.String propertyName, java.lang.Object value)
           
 int getInt(int propertyIndex)
           
 int getInt(Property property)
           
 int getInt(java.lang.String path)
           
 java.util.List getList(int propertyIndex)
           
 java.util.List getList(Property property)
           
 java.util.List getList(java.lang.String path)
           
 long getLong(int propertyIndex)
           
 long getLong(Property property)
           
 long getLong(java.lang.String path)
           
private  java.lang.String getPathPrivate(java.lang.String currentPath, SDODataObject targetObject, java.lang.String aSeparator)
          INTERNAL: Return the SDO Path from the root to the current internal node Prereq: We know that the targetObject will always have a parent as called from getPath() Matching conditions: Iterate up the tree return a non-null string for the XPath at when we reach the root node Function is partially based on SDOCopyHelper.copy(DataObject dataObject) Performance: This function is O(log n) where n=# of children in the tree
 SDOProperty getProperty(java.lang.String propertyName)
           
 java.lang.Object getPropertyInternal(Property property)
          INTERNAL: Get the value of the property (open-content or declared)..
 SDODataObject getRootObject()
           
 SDOSequence getSequence()
           
 Sequence getSequence(int propertyIndex)
          Deprecated. in SDO 2.1.0.
 Sequence getSequence(Property property)
          Deprecated. in SDO 2.1.0.
 Sequence getSequence(java.lang.String path)
          Deprecated. in SDO 2.1.0.
private  Sequence getSequencePrivate(Property aProperty)
          INTERNAL: Return a Sequence object when the conditions of many=false and dataType=false are met.
 java.util.List<Setting> getSettings()
           
 short getShort(int propertyIndex)
           
 short getShort(Property property)
           
 short getShort(java.lang.String path)
           
 java.lang.String getString(int propertyIndex)
           
 java.lang.String getString(Property property)
           
 java.lang.String getString(java.lang.String path)
           
 SDOType getType()
           
private  boolean isContainedByDataGraph(DataGraph aDataGraph, SDOProperty aProperty)
          INTERNAL: Return whether the current dataObject(this) is was part of the passed in dataGraph.
private  boolean isContainedByDataGraph(Property aProperty)
          INTERNAL: Return whether the current dataObject(this) is part of a dataGraph.
private  boolean isLogging()
          INTERNAL: Return the changeSummary logging state
 boolean isSet(int propertyIndex)
           
 boolean isSet(Property property)
           
 boolean isSet(java.lang.String path)
           
 boolean isSetInternal(Property property)
          INTERNAL: Return whether the property (open-content or declared) is set?
 boolean parentContains(java.lang.Object value)
          INTERNAL:
 void removeOpenContentProperty(Property property)
          INTERNAL: Remove the open content property (property) from all 3 data structures.
 void resetChanges()
          INTERNAL: Initialize all old settings related to ChangeSummary and recursively go down the tree to initialize all DataObjects rooted at this DataObject.
 void set(int propertyIndex, java.lang.Object value)
           
 void set(Property property, java.lang.Object value)
           
 void set(SDOProperty property, java.lang.Object value, boolean updateSequence)
          INTERNAL: Sets the value of the given property of the object to the new value.
 void set(java.lang.String path, java.lang.Object value)
           
 void setBigDecimal(int propertyIndex, java.math.BigDecimal value)
           
 void setBigDecimal(Property property, java.math.BigDecimal value)
           
 void setBigDecimal(java.lang.String path, java.math.BigDecimal value)
           
 void setBigInteger(int propertyIndex, java.math.BigInteger value)
           
 void setBigInteger(Property property, java.math.BigInteger value)
           
 void setBigInteger(java.lang.String path, java.math.BigInteger value)
           
 void setBoolean(int propertyIndex, boolean value)
           
 void setBoolean(Property property, boolean value)
           
 void setBoolean(java.lang.String path, boolean value)
           
 void setByte(int propertyIndex, byte value)
           
 void setByte(Property property, byte value)
           
 void setByte(java.lang.String path, byte value)
           
 void setBytes(int propertyIndex, byte[] value)
           
 void setBytes(Property property, byte[] value)
           
 void setBytes(java.lang.String path, byte[] value)
           
private  void setChangeSummaryNonRecursive(ChangeSummary csm)
          INTERNAL:
private  void setChangeSummaryProperty(SDOProperty property, ChangeSummary value)
          INTERNAL:
 void setChar(int propertyIndex, char value)
           
 void setChar(Property property, char value)
           
 void setChar(java.lang.String path, char value)
           
 void setDataGraph(DataGraph dataGraph)
           
 void setDataObject(int propertyIndex, DataObject value)
           
 void setDataObject(Property property, DataObject value)
           
 void setDataObject(java.lang.String path, DataObject value)
           
 void setDate(int propertyIndex, java.util.Date value)
           
 void setDate(Property property, java.util.Date value)
           
 void setDate(java.lang.String path, java.util.Date value)
           
 void setDouble(int propertyIndex, double value)
           
 void setDouble(Property property, double value)
           
 void setDouble(java.lang.String path, double value)
           
 void setFloat(int propertyIndex, float value)
           
 void setFloat(Property property, float value)
           
 void setFloat(java.lang.String path, float value)
           
 void setInt(int propertyIndex, int value)
           
 void setInt(Property property, int value)
           
 void setInt(java.lang.String path, int value)
           
 void setInternal(SDOProperty property, java.lang.Object value, boolean updateSequence)
           
 void setList(int propertyIndex, java.util.List value)
           
 void setList(Property property, java.util.List value)
           
 void setList(java.lang.String path, java.util.List value)
           
 void setLong(int propertyIndex, long value)
           
 void setLong(Property property, long value)
           
 void setLong(java.lang.String path, long value)
           
 void setPropertyInternal(SDOProperty property, java.lang.Object value, boolean updateSequence)
          INTERNAL: Update the ValueStore with the new property value and update any sequence if it exists.
 void setShort(int propertyIndex, short value)
           
 void setShort(Property property, short value)
           
 void setShort(java.lang.String path, short value)
           
 void setString(int propertyIndex, java.lang.String value)
           
 void setString(Property property, java.lang.String value)
           
 void setString(java.lang.String path, java.lang.String value)
           
 void undoChanges(boolean isCSRoot, ChangeSummary cs, SDODataObject origContainer, java.lang.String origContainmentPropName)
          INTERNAL: This function reverses any operations that were performed on this object since change tracking was turned on.
 void unset(int propertyIndex)
           
 void unset(Property property)
           
private  void unset(Property property, boolean fromDelete)
          INTERNAL: This function is implemented internally to unset the specified property on this DataObject
 void unset(Property property, boolean fromDelete, boolean updateSequence)
          INTERNAL: Unset the specified property on this DataObject.
 void unset(java.lang.String path)
           
private  void unsetInternal(Property property, boolean updateSequence)
          INTERNAL: Unset the property on the ValueStore interface and update the sequence if it exists.
private  java.lang.Object unwrapListValue(Property prop, java.lang.Object val)
          Convenience method that unwraps a list and returns the first element, if necessary.
private  void updateChangeSummaryAndDataGraph(ChangeSummary aChangeSummary, DataGraph aDataGraph)
          INTERNAL: Recursively set this DataObject's changeSummary and dataGraph.
private  void updateChangeSummaryWithOriginalValues()
          INTERNAL: Process ValueStore changes on any set/delete/detach/unset when logging is on.
 void updateContainment(Property property, java.util.Collection values)
          INTERNAL: Update containment on the specified collection of values and default to true = update the sequence
 void updateContainment(Property property, java.util.Collection values, boolean updateSequence)
          INTERNAL: Update containment with flagged update sequence state
 void updateContainment(Property property, SDODataObject value)
          INTERNAL: update containment and the update the sequence value by default.
 void updateContainment(Property property, SDODataObject aDataObject, boolean updateSequence)
          INTERNAL: Update containment on the dataObject with specified update sequence state
private  void updateDataGraph(DataGraph aDataGraph)
          INTERNAL: Recursively set this DataObject's DataGraph This function serves as a copy of updateChangeSummaryAndDataGraph() to recursively walk and set the dataGraph.
 java.lang.Object writeReplace()
          INTERNAL: Defined in SDO 2.01 spec on page 65 Externalizable function is called by ObjectStream.writeObject() A replacement object for serialization can be called here.

 

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

 

Field Detail

type

private SDOType type
The Type that this DataObject represents

container

private SDODataObject container

currentValueStore

private ValueStore currentValueStore
The (currentValueStore) will maintain the current state of our model after logged changes - it is a shallow copy of the original, progressively becoming deeper with changes.

openContentProperties

private java.util.List openContentProperties

openContentPropertiesAttributes

private java.util.List openContentPropertiesAttributes

openContentAliasNames

private java.util.Map openContentAliasNames

containmentPropertyName

private java.lang.String containmentPropertyName

changeSummary

private SDOChangeSummary changeSummary

instanceProperties

private java.util.List<SDOProperty> instanceProperties

sdoRef

private java.lang.String sdoRef

sequence

private SDOSequence sequence

dataGraph

private DataGraph dataGraph

aHelperContext

private HelperContext aHelperContext
hold the current context containing all helpers so that we can preserve inter-helper relationships

text

private java.lang.String text
Unique hash ID of this Externalizable class - not required at this point because we serialize the xml representation

Constructor Detail

SDODataObject

public SDODataObject()
INTERNAL: Private constructor. Use #SDODataObject(HelperContext) instead

Method Detail

_setHelperContext

public void _setHelperContext(HelperContext aContext)
INTERNAL: Set the HelperContext that will be associated with this DataObject.
Parameters:
aContext -

get

public java.lang.Object get(java.lang.String path)

set

public void set(java.lang.String path,
                java.lang.Object value)
         throws java.lang.ClassCastException,
                java.lang.UnsupportedOperationException,
                java.lang.IllegalArgumentException
Throws:
java.lang.ClassCastException
java.lang.UnsupportedOperationException
java.lang.IllegalArgumentException

isSet

public boolean isSet(java.lang.String path)

unset

public void unset(java.lang.String path)

getBoolean

public boolean getBoolean(java.lang.String path)
                   throws java.lang.ClassCastException
Throws:
java.lang.ClassCastException

getByte

public byte getByte(java.lang.String path)

getChar

public char getChar(java.lang.String path)

getDouble

public double getDouble(java.lang.String path)

getFloat

public float getFloat(java.lang.String path)

getInt

public int getInt(java.lang.String path)

getLong

public long getLong(java.lang.String path)

getShort

public short getShort(java.lang.String path)

getBytes

public byte[] getBytes(java.lang.String path)

getBigDecimal

public java.math.BigDecimal getBigDecimal(java.lang.String path)

getBigInteger

public java.math.BigInteger getBigInteger(java.lang.String path)

getDataObject

public SDODataObject getDataObject(java.lang.String path)
                            throws java.lang.ClassCastException
Throws:
java.lang.ClassCastException

getDate

public java.util.Date getDate(java.lang.String path)

getString

public java.lang.String getString(java.lang.String path)

getList

public java.util.List getList(java.lang.String path)

setBoolean

public void setBoolean(java.lang.String path,
                       boolean value)

setByte

public void setByte(java.lang.String path,
                    byte value)

setChar

public void setChar(java.lang.String path,
                    char value)

setDouble

public void setDouble(java.lang.String path,
                      double value)

setFloat

public void setFloat(java.lang.String path,
                     float value)

setInt

public void setInt(java.lang.String path,
                   int value)

setLong

public void setLong(java.lang.String path,
                    long value)

setShort

public void setShort(java.lang.String path,
                     short value)

setBytes

public void setBytes(java.lang.String path,
                     byte[] value)

setBigDecimal

public void setBigDecimal(java.lang.String path,
                          java.math.BigDecimal value)

setBigInteger

public void setBigInteger(java.lang.String path,
                          java.math.BigInteger value)

setDataObject

public void setDataObject(java.lang.String path,
                          DataObject value)

setDate

public void setDate(java.lang.String path,
                    java.util.Date value)

setString

public void setString(java.lang.String path,
                      java.lang.String value)

setList

public void setList(java.lang.String path,
                    java.util.List value)

get

public java.lang.Object get(int propertyIndex)
                     throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

set

public void set(int propertyIndex,
                java.lang.Object value)

isSet

public boolean isSet(int propertyIndex)

unset

public void unset(int propertyIndex)

getBoolean

public boolean getBoolean(int propertyIndex)
                   throws java.lang.IllegalArgumentException,
                          java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getByte

public byte getByte(int propertyIndex)
             throws java.lang.IllegalArgumentException,
                    java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getChar

public char getChar(int propertyIndex)
             throws java.lang.IllegalArgumentException,
                    java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getDouble

public double getDouble(int propertyIndex)
                 throws java.lang.IllegalArgumentException,
                        java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getFloat

public float getFloat(int propertyIndex)
               throws java.lang.IllegalArgumentException,
                      java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getInt

public int getInt(int propertyIndex)
           throws java.lang.IllegalArgumentException,
                  java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getLong

public long getLong(int propertyIndex)
             throws java.lang.IllegalArgumentException,
                    java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getShort

public short getShort(int propertyIndex)
               throws java.lang.IllegalArgumentException,
                      java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getBytes

public byte[] getBytes(int propertyIndex)
                throws java.lang.IllegalArgumentException,
                       java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getBigDecimal

public java.math.BigDecimal getBigDecimal(int propertyIndex)
                                   throws java.lang.IllegalArgumentException,
                                          java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getBigInteger

public java.math.BigInteger getBigInteger(int propertyIndex)
                                   throws java.lang.IllegalArgumentException,
                                          java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getDataObject

public SDODataObject getDataObject(int propertyIndex)

getDate

public java.util.Date getDate(int propertyIndex)
                       throws java.lang.IllegalArgumentException,
                              java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getString

public java.lang.String getString(int propertyIndex)
                           throws java.lang.IllegalArgumentException,
                                  java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getList

public java.util.List getList(int propertyIndex)

getSequence

public Sequence getSequence(java.lang.String path)
Deprecated. in SDO 2.1.0.

getSequence

public Sequence getSequence(int propertyIndex)
Deprecated. in SDO 2.1.0.

getSequence

public Sequence getSequence(Property property)
Deprecated. in SDO 2.1.0.

getSequencePrivate

private Sequence getSequencePrivate(Property aProperty)
INTERNAL: Return a Sequence object when the conditions of many=false and dataType=false are met. Throw an UnsupportedOperationException in all other cases.

getSequence

public SDOSequence getSequence()

setBoolean

public void setBoolean(int propertyIndex,
                       boolean value)

setByte

public void setByte(int propertyIndex,
                    byte value)

setChar

public void setChar(int propertyIndex,
                    char value)

setDouble

public void setDouble(int propertyIndex,
                      double value)

setFloat

public void setFloat(int propertyIndex,
                     float value)

setInt

public void setInt(int propertyIndex,
                   int value)

setLong

public void setLong(int propertyIndex,
                    long value)

setShort

public void setShort(int propertyIndex,
                     short value)

setBytes

public void setBytes(int propertyIndex,
                     byte[] value)

setBigDecimal

public void setBigDecimal(int propertyIndex,
                          java.math.BigDecimal value)

setBigInteger

public void setBigInteger(int propertyIndex,
                          java.math.BigInteger value)

setDataObject

public void setDataObject(int propertyIndex,
                          DataObject value)

setDate

public void setDate(int propertyIndex,
                    java.util.Date value)

setString

public void setString(int propertyIndex,
                      java.lang.String value)

setList

public void setList(int propertyIndex,
                    java.util.List value)

get

public java.lang.Object get(Property property)
                     throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

defineOpenContentProperty

public Property defineOpenContentProperty(java.lang.String name,
                                          java.lang.Object value)
                                   throws java.lang.UnsupportedOperationException,
                                          java.lang.IllegalArgumentException
INTERNAL: Create a dynamic open content property if no property exists for (name).
Parameters:
name -
value -
Returns:
Property
Throws:
java.lang.UnsupportedOperationException
java.lang.IllegalArgumentException

defineOpenContentProperty

public Property defineOpenContentProperty(java.lang.String name,
                                          java.lang.Object value,
                                          Type sdotype)
                                   throws java.lang.UnsupportedOperationException,
                                          java.lang.IllegalArgumentException
Throws:
java.lang.UnsupportedOperationException
java.lang.IllegalArgumentException

set

public void set(Property property,
                java.lang.Object value)
         throws java.lang.UnsupportedOperationException,
                java.lang.IllegalArgumentException
Throws:
java.lang.UnsupportedOperationException
java.lang.IllegalArgumentException

setInternal

public void setInternal(SDOProperty property,
                        java.lang.Object value,
                        boolean updateSequence)
                 throws java.lang.UnsupportedOperationException,
                        java.lang.IllegalArgumentException
Throws:
java.lang.UnsupportedOperationException
java.lang.IllegalArgumentException

set

public void set(SDOProperty property,
                java.lang.Object value,
                boolean updateSequence)
         throws java.lang.UnsupportedOperationException,
                java.lang.IllegalArgumentException
INTERNAL: Sets the value of the given property of the object to the new value.

The use of a false updateSequence flag is internally implemented during an SDOSequence.add() call. Refactor: we need to abstract this function using a type of Command pattern to handle the sequence context.

Parameters:
property -
value -
updateSequence -
Throws:
java.lang.UnsupportedOperationException
java.lang.IllegalArgumentException

isSet

public boolean isSet(Property property)

unset

public void unset(Property property)

unset

private void unset(Property property,
                   boolean fromDelete)
INTERNAL: This function is implemented internally to unset the specified property on this DataObject
Parameters:
property -
fromDelete -

unset

public void unset(Property property,
                  boolean fromDelete,
                  boolean updateSequence)
INTERNAL: Unset the specified property on this DataObject. The fromDelete parameter specifies whether we are from a delete or unset/detach operation. The updateSequence parameter is used internally to stop a bidirectional update in the SDOSequence when originally called from this Sequence.
Parameters:
property -
fromDelete -
updateSequence -

getBoolean

public boolean getBoolean(Property property)
                   throws java.lang.IllegalArgumentException,
                          java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getByte

public byte getByte(Property property)
             throws java.lang.IllegalArgumentException,
                    java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getChar

public char getChar(Property property)
             throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getDouble

public double getDouble(Property property)
                 throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getFloat

public float getFloat(Property property)
               throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getInt

public int getInt(Property property)
           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getLong

public long getLong(Property property)
             throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getShort

public short getShort(Property property)
               throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getBytes

public byte[] getBytes(Property property)
                throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getBigDecimal

public java.math.BigDecimal getBigDecimal(Property property)
                                   throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getBigInteger

public java.math.BigInteger getBigInteger(Property property)
                                   throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getDataObject

public SDODataObject getDataObject(Property property)
                            throws java.lang.IllegalArgumentException,
                                   java.lang.ClassCastException
Throws:
java.lang.IllegalArgumentException
java.lang.ClassCastException

getDate

public java.util.Date getDate(Property property)

getString

public java.lang.String getString(Property property)

getList

public java.util.List getList(Property property)

setBoolean

public void setBoolean(Property property,
                       boolean value)

setByte

public void setByte(Property property,
                    byte value)

setChar

public void setChar(Property property,
                    char value)

setDouble

public void setDouble(Property property,
                      double value)

setFloat

public void setFloat(Property property,
                     float value)

setInt

public void setInt(Property property,
                   int value)

setLong

public void setLong(Property property,
                    long value)

setShort

public void setShort(Property property,
                     short value)

setBytes

public void setBytes(Property property,
                     byte[] value)

setBigDecimal

public void setBigDecimal(Property property,
                          java.math.BigDecimal value)

setBigInteger

public void setBigInteger(Property property,
                          java.math.BigInteger value)

setDataObject

public void setDataObject(Property property,
                          DataObject value)

setDate

public void setDate(Property property,
                    java.util.Date value)

setString

public void setString(Property property,
                      java.lang.String value)

setList

public void setList(Property property,
                    java.util.List value)

createDataObject

public DataObject createDataObject(java.lang.String propertyName)

createDataObject

public SDODataObject createDataObject(int propertyIndex)

createDataObject

public SDODataObject createDataObject(Property aProperty)

createDataObject

public SDODataObject createDataObject(java.lang.String propertyName,
                                      java.lang.String namespaceURI,
                                      java.lang.String typeName)

createDataObject

public SDODataObject createDataObject(int propertyIndex,
                                      java.lang.String namespaceURI,
                                      java.lang.String typeName)

createDataObject

public SDODataObject createDataObject(Property property,
                                      Type aType)

detach

private void detach(Property property,
                    java.lang.Object oldValue)
INTERNAL: Perform a detach on a DataObject or List of DataObjects
Parameters:
property -
oldValue - (List or Object)
fromDelete -

detachOrDelete

public void detachOrDelete(boolean fromDelete)
INTERNAL: Recursively walk the tree and set oldSettings for a detached/deleted object. This function performs a single preOrder traversal of the tree. An unset is done for each property if the action = delete Implementors: detach() and delete() via detach
Parameters:
fromDelete - (flag the action true = delete, false = detach)

detachDeleteRecursivePrivate

private void detachDeleteRecursivePrivate(boolean fromDelete,
                                          boolean clearCS,
                                          boolean isRootOfRecursiveLoop)
INTERNAL: Recursively walk the tree and set oldSettings for a detached/deleted object.
Parameters:
fromDelete -
clearCS - (true = clear the cs field) = !(is root of the detach/delete subtree the CS root?)
isRootOfRecursiveLoop - (are we at the root of the detach/delete or inside the subtree)

detachDeleteRecursivePrivateHelper

private void detachDeleteRecursivePrivateHelper(SDODataObject aDataObject,
                                                boolean fromDelete,
                                                boolean clearCS)
INTERNAL: Call detach or delete recursively on aDataObject after possibly changing the flag whether to clear the ChangeSummary pointer at this level
Parameters:
anObject -
isCSRoot -
fromDelete -
subTreeRootHasCS -

detach

public void detach()

detachWithSequenceUpdate

private void detachWithSequenceUpdate()
INTERNAL: Perform a detach action that originated from a detach and update the sequence. Case 01

deleteWithSequenceUpdate

private void deleteWithSequenceUpdate()
INTERNAL: Perform a detach action that originated from a delete and update the sequence. Case 11

detach

private void detach(boolean fromDelete,
                    boolean updateSequence)
INTERNAL: Removes this DataObject from its container, if any. Same as getContainer().getList(getContainmentProperty()).remove(this) or getContainer().unset(getContainmentProperty()) depending on getContainmentProperty().isMany() respectively.
Parameters:
fromDelete - (true = delete action, false = detach/unset)
updateSequence -

delete

public void delete()

getContainer

public SDODataObject getContainer()

getContainmentProperty

public SDOProperty getContainmentProperty()

getDataGraph

public DataGraph getDataGraph()

setDataGraph

public void setDataGraph(DataGraph dataGraph)

getType

public SDOType getType()

getInstanceProperties

public java.util.List getInstanceProperties()

getProperty

public SDOProperty getProperty(java.lang.String propertyName)

getInstanceProperty

public SDOProperty getInstanceProperty(java.lang.String propertyName)

getInstanceProperty

SDOProperty getInstanceProperty(java.lang.String propertyName,
                                java.lang.Object value)

getInstanceProperty

public SDOProperty getInstanceProperty(int propertyIndex)
                                throws java.lang.IllegalArgumentException
INTERNAL:
Parameters:
propertyIndex -
Returns:
Throws:
SDOException
java.lang.IllegalArgumentException

getRootObject

public SDODataObject getRootObject()

getChangeSummary

public SDOChangeSummary getChangeSummary()

_setCreated

public void _setCreated(boolean created)
INTERNAL: Set flag created value.
Parameters:
created - flag created's new value.

_setModified

public void _setModified(boolean modified)
INTERNAL: Set flag modified value.
Parameters:
modified - flag modified's new value.

_setDeleted

private void _setDeleted(boolean deleted)
INTERNAL: Set flag deleted value.
Parameters:
deleted - flag deleted's new value.

setChangeSummaryNonRecursive

private void setChangeSummaryNonRecursive(ChangeSummary csm)
INTERNAL:
Parameters:
csm -

_setChangeSummary

public void _setChangeSummary(SDOChangeSummary aChangeSummary)
INTERNAL: Recursively Set this DataObject's ChangeSummary as passed in value.
Parameters:
aChangeSummary - the ChangeSummary taking this DataObject as root.

updateChangeSummaryAndDataGraph

private void updateChangeSummaryAndDataGraph(ChangeSummary aChangeSummary,
                                             DataGraph aDataGraph)
INTERNAL: Recursively set this DataObject's changeSummary and dataGraph. The parent changeSummary and dataGraph may be null. Preconditions: No changeSummary must exist on the child tree. Callers: Typically updateContainment (during a set) or delete/detach of an object without its own changeSummary property.
Parameters:
aDataGraph -

updateDataGraph

private void updateDataGraph(DataGraph aDataGraph)
INTERNAL: Recursively set this DataObject's DataGraph This function serves as a copy of updateChangeSummaryAndDataGraph() to recursively walk and set the dataGraph. that will be run when no recursion occurs in the case that an object (with a changeSummary) is set internally to a tree (without a changeSummary). Callers: Typically updateContainment (during a set) or delete/detach when the current object is internal with its own changeSummary property.
Parameters:
aDataGraph -

setChangeSummaryProperty

private void setChangeSummaryProperty(SDOProperty property,
                                      ChangeSummary value)
INTERNAL:
Parameters:
property -
value -

undoChanges

public void undoChanges(boolean isCSRoot,
                        ChangeSummary cs,
                        SDODataObject origContainer,
                        java.lang.String origContainmentPropName)
INTERNAL: This function reverses any operations that were performed on this object since change tracking was turned on. The object is returned to the state when logging was first started.
Parameters:
isCSRoot -
cs -
origContainer -
origContainmentPropName -

updateChangeSummaryWithOriginalValues

private void updateChangeSummaryWithOriginalValues()
INTERNAL: Process ValueStore changes on any set/delete/detach/unset when logging is on.

resetChanges

public void resetChanges()
INTERNAL: Initialize all old settings related to ChangeSummary and recursively go down the tree to initialize all DataObjects rooted at this DataObject.

_setType

public void _setType(Type aType)
INTERNAL:
Parameters:
aType -

_setCurrentValueStore

public void _setCurrentValueStore(ValueStore aValueStore)
INTERNAL: Pluggable Interface for substituting the default Map with a custom Map Class
Parameters:
currentValueStore - void

_getCurrentValueStore

public ValueStore _getCurrentValueStore()
INTERNAL: Map interface into the currentValueStore of this DataObject.
Note: Implementers of the ValueStore interface require this accessor.
Returns:

_setContainer

public void _setContainer(DataObject aContainer)
INTERNAL: Sets the DataObject which contains this DataObject.
Parameters:
aContainer - the DataObject which is the container of this DataObject.

_getOpenContentPropertiesAttributesMap

public java.util.Map _getOpenContentPropertiesAttributesMap()

_setOpenContentPropertiesAttributesMap

public void _setOpenContentPropertiesAttributesMap(java.util.Map openAttributeProperties)

_setOpenContentPropertiesWithXMLRoots

public void _setOpenContentPropertiesWithXMLRoots(java.util.List openContentPropertiesWithXMLRoots)
INTERNAL: This function is implemented by SDOType.setOpen() in a mapping setGet/SetMethodName call
Parameters:
openContentPropertiesWithXMLRoots -

createNewProperty

private SDOProperty createNewProperty(java.lang.String propertyName,
                                      java.lang.String propertyUri,
                                      Type theType)

_getOpenContentPropertiesWithXMLRoots

public java.util.List _getOpenContentPropertiesWithXMLRoots()
INTERNAL: This function is implemented by SDOType.setOpen() in a mapping setGet/SetMethodName call
Returns:

_getOpenContentProperties

public java.util.List _getOpenContentProperties()
INTERNAL: Returns a list of the Properties currently used in this DataObject which are not included in getType().getProperties
Returns:
the List of open content Properties currently used in this DataObject.

_getOpenContentAliasNamesMap

private java.util.Map<java.lang.String,Property> _getOpenContentAliasNamesMap()

convertValueAndSet

private void convertValueAndSet(Property property,
                                java.lang.Object originalValue)
INTERNAL:

convertObjectToValue

public java.lang.Object convertObjectToValue(Property property,
                                             java.lang.Class cls)
                                      throws java.lang.ClassCastException,
                                             java.lang.IllegalArgumentException
INTERNAL:
Parameters:
property -
cls -
Returns:
Throws:
java.lang.ClassCastException
java.lang.IllegalArgumentException

convertObjectToValue

public java.lang.Object convertObjectToValue(Property property,
                                             int position,
                                             java.lang.Class cls)
                                      throws java.lang.ClassCastException,
                                             java.lang.IllegalArgumentException
INTERNAL:
Parameters:
property -
position -
cls -
Returns:
Throws:
java.lang.ClassCastException
java.lang.IllegalArgumentException

_setContainmentPropertyName

public void _setContainmentPropertyName(java.lang.String aContainmentPropertyName)
INTERNAL: Sets the name of the property on the containing DataObject which contains this DataObject as a value.
Parameters:
aContainmentPropertyName - the name of the property on the containing DataObject which has this DataObject as a value.

_getContainmentPropertyName

public java.lang.String _getContainmentPropertyName()
INTERNAL: Return the name of the Property of the DataObject containing this data object or null if there is no container.
Returns:
the property containing this data object.

parentContains

public boolean parentContains(java.lang.Object value)
INTERNAL:
Parameters:
value -
Returns:

isContainedByDataGraph

private boolean isContainedByDataGraph(Property aProperty)
INTERNAL: Return whether the current dataObject(this) is part of a dataGraph. Typically this is used to determine whether to treat !isContainment dataObjects as containment while inside a dataGraph.
Parameters:
aProperty -
Returns:

isContainedByDataGraph

private boolean isContainedByDataGraph(DataGraph aDataGraph,
                                       SDOProperty aProperty)
INTERNAL: Return whether the current dataObject(this) is was part of the passed in dataGraph. Typically this is used to determine whether to treat !isContainment dataObjects as containment while inside a dataGraph. The dataGraph input is used when the current DataGraph pointer has already been cleared
Parameters:
aDataGraph -
aProperty -
Returns:

updateContainment

public void updateContainment(Property property,
                              java.util.Collection values,
                              boolean updateSequence)
INTERNAL: Update containment with flagged update sequence state
Parameters:
property -
values -
updateSequence -

updateContainment

public void updateContainment(Property property,
                              java.util.Collection values)
INTERNAL: Update containment on the specified collection of values and default to true = update the sequence
Parameters:
property -
values -

updateContainment

public void updateContainment(Property property,
                              SDODataObject aDataObject,
                              boolean updateSequence)
INTERNAL: Update containment on the dataObject with specified update sequence state
Parameters:
property -
value -

updateContainment

public void updateContainment(Property property,
                              SDODataObject value)
INTERNAL: update containment and the update the sequence value by default.
Parameters:
property -
value -

isLogging

private boolean isLogging()
INTERNAL: Return the changeSummary logging state
Returns:

writeReplace

public java.lang.Object writeReplace()
INTERNAL: Defined in SDO 2.01 spec on page 65 Externalizable function is called by ObjectStream.writeObject() A replacement object for serialization can be called here.

Security Note: This public function exposes a data replacement vulnerability where an outside client can gain access and modify their non-final constants. We may need to wrap the GZIP streams in some sort of encryption when we are not using HTTPS or SSL/TLS on the wire.

See Also:
SDOResolvable

getPathPrivate

private java.lang.String getPathPrivate(java.lang.String currentPath,
                                        SDODataObject targetObject,
                                        java.lang.String aSeparator)
INTERNAL: Return the SDO Path from the root to the current internal node Prereq: We know that the targetObject will always have a parent as called from getPath() Matching conditions: Iterate up the tree return a non-null string for the XPath at when we reach the root node Function is partially based on SDOCopyHelper.copy(DataObject dataObject) Performance: This function is O(log n) where n=# of children in the tree
Parameters:
currentPath -
targetObject -
aSeparator - (XPath separator is written only between elements not for the first call)
Returns:
String (representing the XPath)

_getPath

public java.lang.String _getPath()
INTERNAL: Return an SDO Path string from root of the caller to itself
Returns:
String

getInstancePropertiesArray

private SDOProperty[] getInstancePropertiesArray()
INTERNAL:
Returns:

getPropertyInternal

public java.lang.Object getPropertyInternal(Property property)
INTERNAL: Get the value of the property (open-content or declared)..
Parameters:
property -
Returns:

setPropertyInternal

public void setPropertyInternal(SDOProperty property,
                                java.lang.Object value,
                                boolean updateSequence)
INTERNAL: Update the ValueStore with the new property value and update any sequence if it exists.
Parameters:
property -
value -
updateSequence - (truncate call back from sequence when this function was called from sequence)

addOpenContentProperty

public void addOpenContentProperty(Property property)
INTERNAL: Add the open content property into all 3 data structures. Remove the property from the unset map.
Parameters:
property -

removeOpenContentProperty

public void removeOpenContentProperty(Property property)
INTERNAL: Remove the open content property (property) from all 3 data structures. Add the property to the unset map. We restore this OC property in undoChanges
Parameters:
property -

isSetInternal

public boolean isSetInternal(Property property)
INTERNAL: Return whether the property (open-content or declared) is set?
Parameters:
property -
Returns:
true if set, false otherwise

unsetInternal

private void unsetInternal(Property property,
                           boolean updateSequence)
INTERNAL: Unset the property on the ValueStore interface and update the sequence if it exists. Used by implementers that require
Parameters:
property -
updateSequence -

_getSdoRef

public java.lang.String _getSdoRef()
INTERNAL: Return the sdoref attribute value during unmarshaling
Returns:

_setOpenContentPropertiesAttributes

public void _setOpenContentPropertiesAttributes(java.util.List openContentPropertiesAttributes)

_getOpenContentPropertiesAttributes

public java.util.List _getOpenContentPropertiesAttributes()

getSettings

public java.util.List<Setting> getSettings()
Specified by:
getSettings in interface SequencedObject

_setSdoRef

public void _setSdoRef(java.lang.String newRef)

unwrapListValue

private java.lang.Object unwrapListValue(Property prop,
                                         java.lang.Object val)
Convenience method that unwraps a list and returns the first element, if necessary.
Parameters:
prop -
val -
Returns:

Skip navigation links

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