To use an IndirectList:
org.eclipse.persistence.mappings.CollectionMapping , org.eclipse.persistence.indirection.IndirectMap
| Modifier and Type | Field and Description |
|---|---|
| private transient List | addedElements
Store added elements to avoid instantiation on add. |
| private transient String | attributeName
The mapping attribute name, used to raise change events. |
| private transient PropertyChangeListener | changeListener
Change tracking listener. |
| protected volatile Vector | delegate
Reduce type casting. |
| protected int | initialCapacity
Store initial size for lazy init. |
| private boolean | isListOrderBrokenInDb
If the mapping using IndirectList has listOrderfield != null then this flag indicates whether the list in the db has invalid order: either row(s) with null order value(s) or/and "holes" in order. |
| protected boolean | isRegistered
PERF: Quick check flag if has been registered in a unit of work. |
| private transient List | removedElements
Store removed elements to avoid instantiation on remove. |
| private boolean | useLazyInstantiation
This value is used to determine if we should attempt to do adds and removes from the list without actually instantiating the list from the database. |
| protected volatile ValueHolderInterface | valueHolder
Delegate indirection behavior to a value holder. |
| Access | Constructor and Description |
|---|---|
| public | IndirectList()
PUBLIC:
Construct an empty IndirectList so that its internal data array
has size |
| public | IndirectList(int
the initial capacity of the vector initialCapacity)PUBLIC: Construct an empty IndirectList with the specified initial capacity and with its capacity increment equal to zero. |
| public | IndirectList(int
the initial capacity of the vector initialCapacity, int the amount by which the capacity is
increased when the vector overflows capacityIncrement)PUBLIC: Construct an empty IndirectList with the specified initial capacity and capacity increment. |
| public | IndirectList(Collection<? extends E>
a collection containing the elements to construct this IndirectList with. collection)PUBLIC: Construct an IndirectList containing the elements of the specified collection, in the order they are returned by the collection's iterator. |
| Modifier and Type | Method and Description |
|---|---|
| public PropertyChangeListener | _persistence_getPropertyChangeListener()
Implements org. |
| public void | _persistence_setPropertyChangeListener(PropertyChangeListener changeListener)
Implements org. |
| public void | add(int
index at which the specified element is to be inserted index, E element to be inserted element)Overrides java. Implements java. |
| public boolean | add(E
element to be appended to this Vector element)Overrides java. Implements java. |
| public boolean | addAll(int
index at which to insert the first element from the
specified collection index, Collection<? extends E> elements to be inserted into this Vector c)Overrides java. Implements java. |
| public boolean | addAll(Collection<? extends E>
elements to be inserted into this Vector c)Overrides java. Implements java. |
| public void | addElement(E
the component to be added obj)Overrides java. |
| protected Vector | |
| public int | |
| public void | clear()
Overrides java. Implements java. |
| public void | clearDeferredChanges()
Implements org. |
| public synchronized Object | |
| public boolean | contains(Object
element whose presence in this vector is to be tested element)Overrides java. Implements java. |
| public boolean | containsAll(Collection<?>
a collection whose elements will be tested for containment
in this Vector c)Overrides java. Implements java. |
| public synchronized void | copyInto(Object[]
the array into which the components get copied anArray)Overrides java. |
| public E | elementAt(int
an index into this vector index)Overrides java. |
| public Enumeration | elements()
Overrides java. |
| public void | ensureCapacity(int
the desired minimum capacity minCapacity)Overrides java. |
| public boolean | equals(Object
the Object to be compared for equality with this Vector o)Overrides java. Implements java. |
| public E | firstElement()
Overrides java. 0) of
this vector.
|
| public void | forEach(Consumer<? super E>
The action to be performed for each element action)Overrides java. Overrides default java. Iterable
until all elements have been processed or the action throws an
exception.
|
| public E | get(int
index of the element to return index)Overrides java. Implements java. |
| public List | getAddedElements()
Implements org. |
| protected Vector | |
| public List | getDelegateObject()
Implements org. |
| public List | getRemovedElements()
Implements org. |
| public String | getTrackedAttributeName()
Implements org. |
| public ValueHolderInterface | getValueHolder()
Implements org. |
| public boolean | |
| public boolean | hasBeenRegistered()
INTERNAL: return whether this IndirectList has been registered with the UnitOfWork |
| public boolean | hasDeferredChanges()
Implements org. |
| public int | hashCode()
Overrides java. Implements java. |
| public boolean | |
| public boolean | hasTrackedPropertyChangeListener()
INTERNAL: Return if the collection has a property change listener for change tracking. |
| public int | indexOf(Object
element to search for elem)Overrides java. Implements java. |
| public int | indexOf(Object
element to search for elem, int index to start searching from index)Overrides java. index, or returns -1 if
the element is not found.
|
| public void | insertElementAt(E
the component to insert obj, int where to insert the new component index)Overrides java. index.
|
| public boolean | isEmpty()
Overrides java. Implements java. |
| public boolean | isInstantiated()
Implements org. |
| public boolean | |
| protected boolean | |
| public Iterator | iterator()
Overrides java. Implements java. |
| public E | |
| public int | lastIndexOf(Object
element to search for elem)Overrides java. Implements java. |
| public int | lastIndexOf(Object
element to search for elem, int index to start searching backwards from index)Overrides java. index, or returns -1 if
the element is not found.
|
| public ListIterator | listIterator()
Overrides java. Implements java. |
| public ListIterator | listIterator(final int
index of the first element to be returned from the
list iterator (by a call to index)next)Overrides java. Implements java. |
| public Stream | parallelStream()
Overrides default java. Stream with this collection as its
source.
|
| protected void | raiseAddChangeEvent(E element, Integer index)
Raise the add change event and relationship maintenance. |
| protected void | |
| protected void | |
| protected void | |
| public E | remove(int
the index of the element to be removed index)Overrides java. Implements java. |
| public boolean | remove(Object
element to be removed from this Vector, if present element)Overrides java. Implements java. |
| public boolean | removeAll(Collection<?>
a collection of elements to be removed from the Vector c)Overrides java. Implements java. |
| public void | removeAllElements()
Overrides java. |
| public boolean | removeElement(Object
the component to be removed obj)Overrides java. |
| public void | removeElementAt(int
the index of the object to remove index)Overrides java. |
| public synchronized boolean | removeIf(Predicate<? super E>
a predicate which returns filter)true for elements to be
removedOverrides java. Overrides default java. |
| public synchronized void | replaceAll(UnaryOperator<E>
the operator to apply to each element operator)Overrides java. Overrides default java. |
| public boolean | retainAll(Collection<?>
a collection of elements to be retained in this Vector
(all other elements are removed) c)Overrides java. Implements java. |
| public E | set(int
index of the element to replace index, E element to be stored at the specified position element)Overrides java. Implements java. |
| public void | setElementAt(E
what the component is to be set to obj, int the specified index index)Overrides java. index of this
vector to be the specified object.
|
| public void | |
| public void | setSize(int
the new size of this vector newSize)Overrides java. |
| public void | setTrackedAttributeName(String attributeName)
Implements org. |
| public void | setUseLazyInstantiation(boolean useLazyInstantiation)
Implements org. |
| public void | setValueHolder(ValueHolderInterface<List<E>> valueHolder)
Implements org. |
| protected boolean | |
| protected boolean | shouldUseLazyInstantiation()
Return whether this collection should attempt do deal with adds and removes without retrieving the collection from the dB |
| public int | size()
Overrides java. Implements java. |
| public void | sort(Comparator<? super E>
the c)Comparator used to compare list elements.
A null value indicates that the elements'
natural ordering should be usedOverrides java. Overrides default java. Comparator.
|
| public Spliterator | spliterator()
Overrides java. Overrides default java. Spliterator over the elements in this
list.
|
| public Stream | stream()
Overrides default java. Stream with this collection as its source.
|
| public List | subList(int
low endpoint (inclusive) of the subList fromIndex, int high endpoint (exclusive) of the subList toIndex)Overrides java. Implements java. |
| public Object[] | toArray()
Overrides java. Implements java. |
| public <T> T[] | toArray(T[]
the array into which the elements of the Vector are to
be stored, if it is big enough; otherwise, a new array of the
same runtime type is allocated for this purpose. a)Overrides java. Implements java. |
| public String | toString()
Overrides java. |
| public void | trimToSize()
Overrides java. |
| protected boolean |