EclipseLink 1.0_1.0M2 API Reference - Incubation

org.eclipse.persistence.sdo
Class SDOSequence

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

public class SDOSequence
extends java.lang.Object

INTERNAL:

Purpose:

Responsibilities:

This class uses an implementation of the XMLSetting interface as its sequencing data type.
Adding or removing settings will update the properties on the containing dataObject. Any change to the containing dataObject such as deletion of a sequenced property will result in removal of the setting from this sequence.

The methods on XMLDescriptor -get/setGetSettingsMethodName are used to get/set these settings on the sequence.

See Also:
SDODataObject, org.eclipse.persistence.internal.oxm.XMLSetting
Since:
Oracle TopLink 11.1.1.0.0

Constructor Summary
SDOSequence(SDODataObject aDataObject)
           
 
Method Summary
 void add(int index, int propertyIndex, java.lang.Object value)
          Adds a new entry with the specified property index and value at the specified entry index.
 boolean add(int propertyIndex, java.lang.Object value)
          Adds a new entry with the specified property index and value to the end of the entries.
 void add(int index, java.lang.String text)
          Deprecated. replaced by addText(int, String) in 2.1.0
 void add(int index, java.lang.String propertyName, java.lang.Object value)
          Adds a new entry with the specified property name and value at the specified entry index.
 void add(java.lang.String text)
          Deprecated. replaced by addText(String) in 2.1.0
 boolean add(java.lang.String propertyName, java.lang.Object value)
          Adds a new entry with the specified property name and value to the end of the entries.
 void addText(int index, java.lang.String text)
          Adds a new text entry at the given index.
 void addText(java.lang.String text)
          Adds a new text entry to the end of the Sequence.
 boolean addWithoutUpdate(Property aProperty, java.lang.Object anObject)
          INTERNAL: Adds a new entry with the specified property and value to the end of the entries.
 SDOSequence copy()
          INTERNAL: Return a deep copy of the SDOSequence object.
 SDODataObject getDataObject()
          INTERNAL: Return the SDODataObject that this sequence is associated with.
 int getIndex(Property aProperty, java.lang.Object aValue, int occurrencePosition)
          INTERNAL: Return the index corresponding the the setting based on the property value pair.
 Property getProperty(int index)
          Returns the property for the given entry index.
 java.util.List getSettings()
          INTERNAL: Return the list of SDOSetting objects.
 java.lang.Object getValue(int index)
          Returns the property value for the given entry index.
 void move(int toIndex, int fromIndex)
          Moves the entry at fromIndex to toIndex.
 void remove(int index)
          Removes the entry at the given entry index.
 void remove(int index, boolean updateContainer)
          INTERNAL: Remove the entry at the given sequence index
 void remove(java.lang.String propertyName, java.lang.String uri, boolean updateContainer)
          INTERNAL: Remove all entries at the indexes that correspond to the given propertyName.
 java.lang.Object setValue(int index, java.lang.Object value)
          Sets the entry at a specified index to the new value.
 int size()
          Returns the number of entries in the sequence.
 java.lang.String toString()
          INTERNAL: Print out a String representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SDOSequence

public SDOSequence(SDODataObject aDataObject)
Method Detail

size

public int size()
Returns the number of entries in the sequence.

Returns:
the number of entries.

getSettings

public java.util.List getSettings()
INTERNAL: Return the list of SDOSetting objects.

Returns:

getDataObject

public SDODataObject getDataObject()
INTERNAL: Return the SDODataObject that this sequence is associated with.

Returns:

getProperty

public Property getProperty(int index)
Returns the property for the given entry index. Returns null for mixed text entries.

Parameters:
index - the index of the entry.
Returns:
the property or null for the given entry index.

getValue

public java.lang.Object getValue(int index)
Returns the property value for the given entry index.

Parameters:
index - the index of the entry.
Returns:
the value for the given entry index.

setValue

public java.lang.Object setValue(int index,
                                 java.lang.Object value)
Sets the entry at a specified index to the new value.

Parameters:
index - the index of the entry.
value - the new value for the entry.

add

public boolean add(java.lang.String propertyName,
                   java.lang.Object value)
Adds a new entry with the specified property name and value to the end of the entries.

Parameters:
propertyName - the name of the entry's property.
value - the value for the entry.

add

public boolean add(int propertyIndex,
                   java.lang.Object value)
Adds a new entry with the specified property index and value to the end of the entries.

Parameters:
propertyIndex - the index of the entry's property.
value - the value for the entry.

addWithoutUpdate

public boolean addWithoutUpdate(Property aProperty,
                                java.lang.Object anObject)
INTERNAL: Adds a new entry with the specified property and value to the end of the entries. If this add is actually a modify then we will handle duplication.

Does not do an update of the container dataObject. This function is used internally by the SDODataObject implementation.

Parameters:
aProperty - the property of the entry.
anObject - the value for the entry.

add

public void add(int index,
                java.lang.String propertyName,
                java.lang.Object value)
Adds a new entry with the specified property name and value at the specified entry index.

Parameters:
index - the index at which to add the entry.
propertyName - the name of the entry's property.
value - the value for the entry.

add

public void add(int index,
                int propertyIndex,
                java.lang.Object value)
Adds a new entry with the specified property index and value at the specified entry index.

Parameters:
index - the index at which to add the entry.
propertyIndex - the index of the entry's property.
value - the value for the entry.

getIndex

public int getIndex(Property aProperty,
                    java.lang.Object aValue,
                    int occurrencePosition)
INTERNAL: Return the index corresponding the the setting based on the property value pair. Note: this function will only remove the first occurrence of multiple primitives like int. Returns -1 for index not found

Parameters:
aProperty -
aValue -
occurrencePosition - 0=first, 1=second..
Returns:

remove

public void remove(int index)
Removes the entry at the given entry index.

Parameters:
index - the index of the entry.

remove

public void remove(java.lang.String propertyName,
                   java.lang.String uri,
                   boolean updateContainer)
INTERNAL: Remove all entries at the indexes that correspond to the given propertyName.

Parameters:
propertyName -
updateContainer -
See Also:
unsetInternal()

remove

public void remove(int index,
                   boolean updateContainer)
INTERNAL: Remove the entry at the given sequence index

Parameters:
index -
updateContainer -

move

public void move(int toIndex,
                 int fromIndex)
Moves the entry at fromIndex to toIndex.

Parameters:
toIndex - the index of the entry destination.
fromIndex - the index of the entry to move.

add

public void add(java.lang.String text)
Deprecated. replaced by addText(String) in 2.1.0

Adds a new text entry to the end of the Sequence.


add

public void add(int index,
                java.lang.String text)
Deprecated. replaced by addText(int, String) in 2.1.0

Adds a new text entry at the given index.


addText

public void addText(java.lang.String text)
Adds a new text entry to the end of the Sequence.

Parameters:
text - value of the entry.

addText

public void addText(int index,
                    java.lang.String text)
Adds a new text entry at the given index.

Parameters:
index - the index at which to add the entry.
text - value of the entry.

copy

public SDOSequence copy()
INTERNAL: Return a deep copy of the SDOSequence object. The settings in the sequence are not shared between the 2 sequence objects.

Returns:

toString

public java.lang.String toString()
INTERNAL: Print out a String representation of this object

Overrides:
toString in class java.lang.Object

EclipseLink 1.0_1.0M2 API Reference - Incubation