public class IndirectList extends Vector implements CollectionChangeTracker, IndirectCollection
To use an IndirectList:
CollectionMapping
,
IndirectMap
,
Serialized FormConstructor and Description |
---|
IndirectList()
PUBLIC:
Construct an empty IndirectList so that its internal data array
has size 10 and its standard capacity increment is zero.
|
IndirectList(Collection collection)
PUBLIC:
Construct an IndirectList containing the elements of the specified
collection, in the order they are returned by the collection's
iterator.
|
IndirectList(int initialCapacity)
PUBLIC:
Construct an empty IndirectList with the specified initial capacity and
with its capacity increment equal to zero.
|
IndirectList(int initialCapacity,
int capacityIncrement)
PUBLIC:
Construct an empty IndirectList with the specified initial capacity and
capacity increment.
|
Modifier and Type | Method and Description |
---|---|
PropertyChangeListener |
_persistence_getPropertyChangeListener()
INTERNAL:
Return the property change listener for change tracking.
|
void |
_persistence_setPropertyChangeListener(PropertyChangeListener changeListener)
INTERNAL:
Set the property change listener for change tracking.
|
void |
add(int index,
Object element) |
boolean |
add(Object element) |
boolean |
addAll(Collection c) |
boolean |
addAll(int index,
Collection c) |
void |
addElement(Object obj) |
int |
capacity() |
void |
clear() |
Object |
clone()
PUBLIC:
|
boolean |
contains(Object element)
PUBLIC:
|
boolean |
containsAll(Collection c) |
void |
copyInto(Object[] anArray) |
Object |
elementAt(int index) |
Enumeration |
elements() |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(Object o) |
Object |
firstElement() |
Object |
get(int index) |
Collection |
getAddedElements()
INTERNAL:
Return the elements that have been added before instantiation.
|
Object |
getDelegateObject()
INTERNAL:
Return the real collection object.
|
Collection |
getRemovedElements()
INTERNAL:
Return the elements that have been removed before instantiation.
|
String |
getTrackedAttributeName()
INTERNAL:
Return the mapping attribute name, used to raise change events.
|
ValueHolderInterface |
getValueHolder()
INTERNAL:
Return the valueHolder.
|
boolean |
hasAddedElements()
INTERNAL:
Return if any elements that have been added before instantiation.
|
boolean |
hasBeenRegistered()
INTERNAL:
return whether this IndirectList has been registered with the UnitOfWork
|
boolean |
hasDeferredChanges()
INTERNAL:
Return if any elements that have been added or removed before instantiation.
|
int |
hashCode()
INTERNAL:
|
boolean |
hasRemovedElements()
INTERNAL:
Return if any elements that have been removed before instantiation.
|
boolean |
hasTrackedPropertyChangeListener()
INTERNAL:
Return if the collection has a property change listener for change tracking.
|
int |
indexOf(Object elem) |
int |
indexOf(Object elem,
int index) |
void |
insertElementAt(Object obj,
int index) |
boolean |
isEmpty() |
boolean |
isInstantiated()
PUBLIC:
Return whether the contents have been read from the database.
|
boolean |
isListOrderBrokenInDb() |
Iterator |
iterator() |
Object |
lastElement() |
int |
lastIndexOf(Object elem) |
int |
lastIndexOf(Object elem,
int index) |
ListIterator |
listIterator() |
ListIterator |
listIterator(int index) |
Object |
remove(int index) |
boolean |
remove(Object element) |
boolean |
removeAll(Collection c) |
void |
removeAllElements() |
boolean |
removeElement(Object obj) |
void |
removeElementAt(int index) |
boolean |
retainAll(Collection c) |
Object |
set(int index,
Object element) |
void |
setElementAt(Object obj,
int index) |
void |
setIsListOrderBrokenInDb(boolean isBroken) |
void |
setSize(int newSize) |
void |
setTrackedAttributeName(String attributeName)
INTERNAL:
Set the mapping attribute name, used to raise change events.
|
void |
setValueHolder(ValueHolderInterface valueHolder)
INTERNAL:
Set the value holder.
|
int |
size() |
List |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
String |
toString()
PUBLIC:
Use the java.util.Vector#toString(); but wrap it with braces to indicate
there is a bit of indirection.
|
void |
trimToSize() |
public IndirectList()
public IndirectList(int initialCapacity)
initialCapacity
- the initial capacity of the vectorIllegalArgumentException
- if the specified initial capacity
is negativepublic IndirectList(int initialCapacity, int capacityIncrement)
initialCapacity
- the initial capacity of the vectorcapacityIncrement
- the amount by which the capacity is
increased when the vector overflowsIllegalArgumentException
- if the specified initial capacity
is negativepublic IndirectList(Collection collection)
collection
- a collection containing the elements to construct this IndirectList with.public void add(int index, Object element)
add
in interface List
add
in class Vector
Vector.add(int, java.lang.Object)
public boolean add(Object element)
add
in interface Collection
add
in interface List
add
in class Vector
Vector.add(java.lang.Object)
public boolean addAll(int index, Collection c)
addAll
in interface List
addAll
in class Vector
Vector.addAll(int, java.util.Collection)
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface List
addAll
in class Vector
Vector.addAll(java.util.Collection)
public void addElement(Object obj)
addElement
in class Vector
Vector.addElement(java.lang.Object)
public int capacity()
capacity
in class Vector
Vector.capacity()
public void clear()
clear
in interface Collection
clear
in interface List
clear
in class Vector
Vector.clear()
public Object clone()
clone
in class Vector
This will result in a database query if necessary.
public boolean contains(Object element)
contains
in interface Collection
contains
in interface List
contains
in class Vector
Vector.contains(java.lang.Object)
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface List
containsAll
in class Vector
Vector.containsAll(java.util.Collection)
public void copyInto(Object[] anArray)
copyInto
in class Vector
Vector.copyInto(java.lang.Object[])
public Object elementAt(int index)
elementAt
in class Vector
Vector.elementAt(int)
public Enumeration elements()
elements
in class Vector
Vector.elements()
public void ensureCapacity(int minCapacity)
ensureCapacity
in class Vector
Vector.ensureCapacity(int)
public boolean equals(Object o)
equals
in interface Collection
equals
in interface List
equals
in class Vector
Vector.equals(java.lang.Object)
public Object firstElement()
firstElement
in class Vector
Vector.firstElement()
public Object get(int index)
get
in interface List
get
in class Vector
Vector.get(int)
public Object getDelegateObject()
getDelegateObject
in interface IndirectCollection
public ValueHolderInterface getValueHolder()
getValueHolder
in interface IndirectContainer
public boolean hasBeenRegistered()
public int hashCode()
hashCode
in interface Collection
hashCode
in interface List
hashCode
in class Vector
Vector.hashCode()
public int indexOf(Object elem)
indexOf
in interface List
indexOf
in class Vector
Vector.indexOf(java.lang.Object)
public int indexOf(Object elem, int index)
indexOf
in class Vector
Vector.indexOf(java.lang.Object, int)
public void insertElementAt(Object obj, int index)
insertElementAt
in class Vector
Vector.insertElementAt(java.lang.Object, int)
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface List
isEmpty
in class Vector
Vector.isEmpty()
public boolean isInstantiated()
isInstantiated
in interface IndirectContainer
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface List
iterator
in class Vector
AbstractList.iterator()
public Object lastElement()
lastElement
in class Vector
Vector.lastElement()
public int lastIndexOf(Object elem)
lastIndexOf
in interface List
lastIndexOf
in class Vector
Vector.lastIndexOf(java.lang.Object)
public int lastIndexOf(Object elem, int index)
lastIndexOf
in class Vector
Vector.lastIndexOf(java.lang.Object, int)
public ListIterator listIterator()
listIterator
in interface List
listIterator
in class Vector
AbstractList.listIterator()
public ListIterator listIterator(int index)
listIterator
in interface List
listIterator
in class Vector
AbstractList.listIterator(int)
public Object remove(int index)
remove
in interface List
remove
in class Vector
Vector.remove(int)
public boolean remove(Object element)
remove
in interface Collection
remove
in interface List
remove
in class Vector
Vector.remove(java.lang.Object)
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface List
removeAll
in class Vector
Vector.removeAll(java.util.Collection)
public void removeAllElements()
removeAllElements
in class Vector
Vector.removeAllElements()
public boolean removeElement(Object obj)
removeElement
in class Vector
Vector.removeElement(java.lang.Object)
public void removeElementAt(int index)
removeElementAt
in class Vector
Vector.removeElementAt(int)
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface List
retainAll
in class Vector
Vector.retainAll(java.util.Collection)
public Object set(int index, Object element)
set
in interface List
set
in class Vector
Vector.set(int, java.lang.Object)
public void setElementAt(Object obj, int index)
setElementAt
in class Vector
Vector.setElementAt(java.lang.Object, int)
public void setSize(int newSize)
setSize
in class Vector
Vector.setSize(int)
public void setValueHolder(ValueHolderInterface valueHolder)
setValueHolder
in interface IndirectContainer
public int size()
size
in interface Collection
size
in interface List
size
in class Vector
Vector.size()
public List subList(int fromIndex, int toIndex)
subList
in interface List
subList
in class Vector
Vector.subList(int, int)
public Object[] toArray()
toArray
in interface Collection
toArray
in interface List
toArray
in class Vector
Vector.toArray()
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface List
toArray
in class Vector
Vector.toArray(java.lang.Object[])
public String toString()
toString
in class Vector
Vector.toString()
public void trimToSize()
trimToSize
in class Vector
Vector.trimToSize()
public PropertyChangeListener _persistence_getPropertyChangeListener()
_persistence_getPropertyChangeListener
in interface ChangeTracker
public boolean hasTrackedPropertyChangeListener()
public void _persistence_setPropertyChangeListener(PropertyChangeListener changeListener)
_persistence_setPropertyChangeListener
in interface ChangeTracker
public String getTrackedAttributeName()
getTrackedAttributeName
in interface CollectionChangeTracker
public void setTrackedAttributeName(String attributeName)
setTrackedAttributeName
in interface CollectionChangeTracker
public Collection getRemovedElements()
getRemovedElements
in interface IndirectCollection
public Collection getAddedElements()
getAddedElements
in interface IndirectCollection
public boolean hasAddedElements()
public boolean hasRemovedElements()
public boolean hasDeferredChanges()
hasDeferredChanges
in interface IndirectCollection
public boolean isListOrderBrokenInDb()
public void setIsListOrderBrokenInDb(boolean isBroken)