public class ListWrapper extends Object implements List, Serializable, Cloneable
Purpose:
Responsibilities:
dataObject
sSDODataObject
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected 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,
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,
Object item)
Inserts the specified element at the index position in this list.
|
void |
add(int index,
Object item,
boolean updateSequence)
INTERNAL:
|
boolean |
add(Object item) |
boolean |
add(Object item,
boolean updateSequence)
INTERNAL:
|
boolean |
addAll(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(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,
Collection items)
Inserts all of the currentElements in the specified Collection into this list, starting at the
specified position.
|
boolean |
addAll(int position,
Collection items,
boolean updateSequence) |
void |
clear()
Removes all of the currentElements from this list.
|
void |
clear(boolean updateSequence)
INTERNAL:
|
Object |
clone()
Clone the ListWrapper.
|
boolean |
contains(Object item) |
boolean |
containsAll(Collection items) |
protected void |
copyElements()
INTERNAL:
Shallow copy elements
|
Object |
get(int position) |
List |
getCurrentElements()
INTERNAL:
|
int |
indexOf(Object item) |
boolean |
isEmpty() |
protected boolean |
isLogging()
INTERNAL:
|
Iterator |
iterator() |
int |
lastIndexOf(Object item) |
ListIterator |
listIterator() |
ListIterator |
listIterator(int position) |
Object |
remove(int index)
Removes the element at the specified position in this list.
Position index starts at 0. |
Object |
remove(int index,
boolean updateSequence)
INTERNAL:
Removes the element at the specified position in this list.
Position index starts at 0. |
boolean |
remove(Object item) |
boolean |
remove(Object item,
boolean fromDelete,
boolean updateSequence)
INTERNAL:
Remove the item or first occurrence of the item.
|
boolean |
removeAll(Collection items)
Removes from this collection all of its currentElements that are contained in the specified collection.
|
boolean |
removeAll(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,
Object item,
boolean fromDelete,
boolean updateSequence)
INTERNAL:
|
protected void |
removeContainment(Object item,
boolean fromDelete,
boolean updateSequence)
INTERNAL:
|
boolean |
retainAll(Collection itemsToKeep)
Retains only the currentElements in this collection that are contained in the specified collection
(optional operation).
In other words, removes from this collection all of its currentElements that are not contained in the specified collection. |
Object |
set(int index,
Object item)
Replaces the element at the specified index in this list with the specified element.
|
void |
setCurrentElements(List currentElementsList)
INTERNAL:
bypass containment and changesummary copy of element list on modifications
|
int |
size() |
List |
subList(int start,
int end)
Return a view of the specified portion of the list
|
Object[] |
toArray() |
Object[] |
toArray(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(Collection items,
boolean updateSequence) |
protected void |
updateContainment(Object item,
boolean updateSequence)
INTERNAL:
|
protected void |
updateSequence(Property aProperty,
Collection items,
boolean updateSequence)
INTERNAL:
Iterate the collection and add settings where appropriate.
|
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.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
protected SDODataObject dataObject
protected SDOProperty property
protected List currentElements
public ListWrapper()
public ListWrapper(SDODataObject theDataObject, Property theProperty)
public ListWrapper(SDODataObject theDataObject, Property theProperty, List theList)
public boolean add(Object item)
add
in interface Collection
add
in interface List
public boolean add(Object item, boolean updateSequence)
item
- updateSequence
- public void add(int index, Object item)
public void add(int index, Object item, boolean updateSequence)
index
- item
- updateSequence
- protected boolean isLogging()
protected void copyElements()
public void undoChanges(SDOChangeSummary cs)
protected void updateSequence(Property aProperty, Collection items, boolean updateSequence)
aProperty
- items
- updateSequence
- protected void updateContainment(Object item, boolean updateSequence)
item
- updateSequence
- protected void updateContainment(Collection items, boolean updateSequence)
protected void removeContainment(Object item, boolean fromDelete, boolean updateSequence)
item
- fromDelete
- updateSequence
- protected void removeContainment(int occurrence, Object item, boolean fromDelete, boolean updateSequence)
item
- fromDelete
- updateSequence
- public boolean remove(Object item, boolean fromDelete, boolean updateSequence)
item
- fromDelete
- updateSequence
- public boolean remove(Object item)
remove
in interface Collection
remove
in interface List
item
- public boolean addAll(Collection items)
addAll
in interface Collection
addAll
in interface List
items
- public boolean addAll(Collection items, boolean updateSequence)
items
- updateSequence
- public boolean addAll(int position, Collection items)
public boolean addAll(int position, Collection items, boolean updateSequence)
public boolean removeAll(Collection items)
removeAll
in interface Collection
removeAll
in interface List
items
- public boolean removeAll(Collection items, boolean updateSequence)
items
- updateSequence
- public boolean retainAll(Collection itemsToKeep)
retainAll
in interface Collection
retainAll
in interface List
itemsToKeep
- public void clear()
clear
in interface Collection
clear
in interface List
public void clear(boolean updateSequence)
updateSequence
- public Object set(int index, Object item)
public Object remove(int index, boolean updateSequence)
index
- updateSequence
- public Object remove(int index)
public ListIterator listIterator()
listIterator
in interface List
public ListIterator listIterator(int position)
listIterator
in interface List
public List subList(int start, int end)
public Object[] toArray()
toArray
in interface Collection
toArray
in interface List
public Object[] toArray(Object[] items)
toArray
in interface Collection
toArray
in interface List
items
- -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 Collection
size
in interface List
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface List
public boolean contains(Object item)
contains
in interface Collection
contains
in interface List
public boolean containsAll(Collection items)
containsAll
in interface Collection
containsAll
in interface List
public Iterator iterator()
public int lastIndexOf(Object item)
lastIndexOf
in interface List
public Object writeReplace()
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.
SDOResolvable
public List getCurrentElements()
public void setCurrentElements(List currentElementsList)
Copyright © 2017–2020 Eclipse.org - EclipseLink Project. All rights reserved.