public class ListWrapper
extends java.lang.Object
implements java.util.List, java.io.Serializable, java.lang.Cloneable
dataObjectsSDODataObject,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected java.util.List |
currentElements
We are maintaining two pointers to potentially two ArrayList objects.
|
protected SDODataObject |
dataObject |
protected SDOProperty |
property |
| Constructor and Description |
|---|
ListWrapper() |
ListWrapper(SDODataObject theDataObject,
Property theProperty) |
ListWrapper(SDODataObject theDataObject,
Property theProperty,
java.util.List theList)
Constructor for non-default Pluggable ValueStore implementations
Prerequisites: Containment is already set on theList parameter. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
java.lang.Object item)
Inserts the specified element at the index position in this list.
|
void |
add(int index,
java.lang.Object item,
boolean updateSequence)
INTERNAL:
|
boolean |
add(java.lang.Object item) |
boolean |
add(java.lang.Object item,
boolean updateSequence)
INTERNAL:
|
boolean |
addAll(java.util.Collection items)
Appends all of the currentElements in the specified Collection to the end of this list,
in the order that they are returned by the specified Collection's Iterator.
|
boolean |
addAll(java.util.Collection items,
boolean updateSequence)
INTERNAL:
Appends all of the currentElements in the specified Collection to the end of this list,
in the order that they are returned by the specified Collection's Iterator.
|
boolean |
addAll(int position,
java.util.Collection items)
Inserts all of the currentElements in the specified Collection into this list, starting at the
specified position.
|
boolean |
addAll(int position,
java.util.Collection items,
boolean updateSequence) |
void |
clear()
Removes all of the currentElements from this list.
|
void |
clear(boolean updateSequence)
INTERNAL:
|
java.lang.Object |
clone()
Clone the ListWrapper.
|
boolean |
contains(java.lang.Object item) |
boolean |
containsAll(java.util.Collection items) |
protected void |
copyElements()
INTERNAL:
Shallow copy elements
|
java.lang.Object |
get(int position) |
java.util.List |
getCurrentElements()
INTERNAL:
|
int |
indexOf(java.lang.Object item) |
boolean |
isEmpty() |
protected boolean |
isLogging()
INTERNAL:
|
java.util.Iterator |
iterator() |
int |
lastIndexOf(java.lang.Object item) |
java.util.ListIterator |
listIterator() |
java.util.ListIterator |
listIterator(int position) |
java.lang.Object |
remove(int index)
Removes the element at the specified position in this list.
|
java.lang.Object |
remove(int index,
boolean updateSequence)
INTERNAL:
Removes the element at the specified position in this list.
|
boolean |
remove(java.lang.Object item) |
boolean |
remove(java.lang.Object item,
boolean fromDelete,
boolean updateSequence)
INTERNAL:
Remove the item or first occurrence of the item.
|
boolean |
removeAll(java.util.Collection items)
Removes from this collection all of its currentElements that are contained in the specified collection.
|
boolean |
removeAll(java.util.Collection items,
boolean updateSequence)
INTERNAL:
Removes from this collection all of its currentElements that are contained in the specified collection.
|
protected void |
removeContainment(int occurrence,
java.lang.Object item,
boolean fromDelete,
boolean updateSequence)
INTERNAL:
|
protected void |
removeContainment(java.lang.Object item,
boolean fromDelete,
boolean updateSequence)
INTERNAL:
|
boolean |
retainAll(java.util.Collection itemsToKeep)
Retains only the currentElements in this collection that are contained in the specified collection
(optional operation).
|
java.lang.Object |
set(int index,
java.lang.Object item)
Replaces the element at the specified index in this list with the specified element.
|
void |
setCurrentElements(java.util.List currentElementsList)
INTERNAL:
bypass containment and changesummary copy of element list on modifications
|
int |
size() |
java.util.List |
subList(int start,
int end)
Return a view of the specified portion of the list
|
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] items)
Returns an array containing all of the currentElements in this list in proper sequence;
the runtime type of the returned array is that of the specified array.
|
void |
undoChanges(SDOChangeSummary cs)
INTERNAL:
Undo any changes and return the original List
|
protected void |
updateContainment(java.util.Collection items,
boolean updateSequence) |
protected void |
updateContainment(java.lang.Object item,
boolean updateSequence)
INTERNAL:
|
protected void |
updateSequence(Property aProperty,
java.util.Collection items,
boolean updateSequence)
INTERNAL:
Iterate the collection and add settings where appropriate.
|
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.
|
protected SDODataObject dataObject
protected SDOProperty property
protected java.util.List currentElements
public ListWrapper()
public ListWrapper(SDODataObject theDataObject, Property theProperty)
public ListWrapper(SDODataObject theDataObject, Property theProperty, java.util.List theList)
public boolean add(java.lang.Object item)
add in interface java.util.Collectionadd in interface java.util.Listpublic boolean add(java.lang.Object item,
boolean updateSequence)
item - updateSequence - public void add(int index,
java.lang.Object item)
add in interface java.util.Listposition - (start at 0 = prepend, length = append)item - public void add(int index,
java.lang.Object item,
boolean updateSequence)
index - item - updateSequence - protected boolean isLogging()
protected void copyElements()
public void undoChanges(SDOChangeSummary cs)
protected void updateSequence(Property aProperty, java.util.Collection items, boolean updateSequence)
aProperty - items - updateSequence - protected void updateContainment(java.lang.Object item,
boolean updateSequence)
item - updateSequence - protected void updateContainment(java.util.Collection items,
boolean updateSequence)
protected void removeContainment(java.lang.Object item,
boolean fromDelete,
boolean updateSequence)
item - fromDelete - updateSequence - protected void removeContainment(int occurrence,
java.lang.Object item,
boolean fromDelete,
boolean updateSequence)
item - fromDelete - updateSequence - public boolean remove(java.lang.Object item,
boolean fromDelete,
boolean updateSequence)
item - fromDelete - updateSequence - public boolean remove(java.lang.Object item)
remove in interface java.util.Collectionremove in interface java.util.Listitem - public boolean addAll(java.util.Collection items)
addAll in interface java.util.CollectionaddAll in interface java.util.Listitems - public boolean addAll(java.util.Collection items,
boolean updateSequence)
items - updateSequence - public boolean addAll(int position,
java.util.Collection items)
addAll in interface java.util.Listposition - (start at 0 = prepend, length = append)items - public boolean addAll(int position,
java.util.Collection items,
boolean updateSequence)
public boolean removeAll(java.util.Collection items)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Listitems - public boolean removeAll(java.util.Collection items,
boolean updateSequence)
items - updateSequence - public boolean retainAll(java.util.Collection itemsToKeep)
retainAll in interface java.util.CollectionretainAll in interface java.util.ListitemsToKeep - public void clear()
clear in interface java.util.Collectionclear in interface java.util.Listpublic void clear(boolean updateSequence)
updateSequence - public java.lang.Object set(int index,
java.lang.Object item)
set in interface java.util.Listindex - item - public java.lang.Object remove(int index,
boolean updateSequence)
index - updateSequence - public java.lang.Object remove(int index)
remove in interface java.util.Listindex - public java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int position)
listIterator in interface java.util.Listpublic java.util.List subList(int start,
int end)
subList in interface java.util.Liststart - - low endpoint (inclusive) of the subList.end - - high endpoint (exclusive) of the subList.public java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] items)
toArray in interface java.util.CollectiontoArray in interface java.util.Listitems - -the array into which the currentElements of this list are to be stored, if it is big enough;
otherwise, a new array of the same runtime type is allocated for this purpose.public int size()
size in interface java.util.Collectionsize in interface java.util.Listpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.Listpublic boolean contains(java.lang.Object item)
contains in interface java.util.Collectioncontains in interface java.util.Listpublic boolean containsAll(java.util.Collection items)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Listpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listpublic int indexOf(java.lang.Object item)
indexOf in interface java.util.Listpublic int lastIndexOf(java.lang.Object item)
lastIndexOf in interface java.util.Listpublic java.lang.Object get(int position)
get in interface java.util.Listpublic java.lang.Object writeReplace()
SDOResolvablepublic java.util.List getCurrentElements()
public void setCurrentElements(java.util.List currentElementsList)
public java.lang.Object clone()
clone in class java.lang.Object