E
- the type of elements maintained by this setpublic class IndirectSet<E> extends Object implements CollectionChangeTracker, Set<E>, IndirectCollection, Cloneable, Serializable
To use an IndirectSet:
Implementation notes:
CollectionMapping
,
Serialized FormConstructor and Description |
---|
IndirectSet()
Construct an empty IndirectSet.
|
IndirectSet(Collection<? extends E> c)
Construct an IndirectSet containing the elements of the specified collection.
|
IndirectSet(int initialCapacity)
Construct an empty IndirectSet with the specified initial capacity.
|
IndirectSet(int initialCapacity,
float loadFactor)
Construct an empty IndirectSet with the specified initial capacity and
load factor.
|
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.
|
boolean |
add(E element) |
boolean |
addAll(Collection<? extends E> c) |
void |
clear() |
void |
clearDeferredChanges()
INTERNAL:
clear any changes that have been deferred to instantiation.
|
Object |
clone() |
boolean |
contains(Object element) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
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 IndirectSet has been registered in a UnitOfWork
|
boolean |
hasDeferredChanges()
INTERNAL:
Return if any elements that have been added or removed before instantiation.
|
int |
hashCode() |
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.
|
boolean |
isEmpty() |
boolean |
isInstantiated()
Return whether the contents have been read from the database.
|
Iterator<E> |
iterator() |
boolean |
remove(Object element) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
void |
setTrackedAttributeName(String attributeName)
INTERNAL:
Set the mapping attribute name, used to raise change events.
|
void |
setUseLazyInstantiation(boolean useLazyInstantiation)
INTERNAL
Set whether this collection should attempt do deal with adds and removes without retrieving the
collection from the dB
|
void |
setValueHolder(ValueHolderInterface valueHolder)
INTERNAL:
Set the value holder.
|
int |
size() |
Object[] |
toArray() |
<E> E[] |
toArray(E[] a) |
String |
toString()
Use the delegate's #toString(); but wrap it with braces to indicate
there is a bit of indirection.
|
spliterator
parallelStream, removeIf, stream
public IndirectSet()
public IndirectSet(int initialCapacity)
initialCapacity
- the initial capacity of the setIllegalArgumentException
- if the specified initial capacity
is negativepublic IndirectSet(int initialCapacity, float loadFactor)
initialCapacity
- the initial capacity of the setloadFactor
- the load factor of the setIllegalArgumentException
- if the specified initial capacity
is negativepublic IndirectSet(Collection<? extends E> c)
c
- the initial elements of the setpublic boolean add(E element)
add
in interface Collection<E>
add
in interface Set<E>
Set.add(java.lang.Object)
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
addAll
in interface Set<E>
Set.addAll(java.util.Collection)
public void clear()
clear
in interface Collection<E>
clear
in interface Set<E>
Set.clear()
public void clearDeferredChanges()
clearDeferredChanges
in interface IndirectCollection
public Object clone()
clone
in class Object
This will result in a database query if necessary.
public boolean contains(Object element)
contains
in interface Collection<E>
contains
in interface Set<E>
Set.contains(java.lang.Object)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface Set<E>
Set.containsAll(java.util.Collection)
public boolean equals(Object o)
equals
in interface Collection<E>
equals
in interface Set<E>
equals
in class Object
Set.equals(java.lang.Object)
public Object getDelegateObject()
getDelegateObject
in interface IndirectCollection
public ValueHolderInterface getValueHolder()
getValueHolder
in interface IndirectContainer
public boolean hasBeenRegistered()
public int hashCode()
hashCode
in interface Collection<E>
hashCode
in interface Set<E>
hashCode
in class Object
Set.hashCode()
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in interface Set<E>
Set.isEmpty()
public boolean isInstantiated()
isInstantiated
in interface IndirectContainer
public Iterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in interface Set<E>
Set.iterator()
public boolean remove(Object element)
remove
in interface Collection<E>
remove
in interface Set<E>
Set.remove(java.lang.Object)
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
removeAll
in interface Set<E>
Set.removeAll(java.util.Collection)
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
retainAll
in interface Set<E>
Set.retainAll(java.util.Collection)
public void setValueHolder(ValueHolderInterface valueHolder)
setValueHolder
in interface IndirectContainer
public void setUseLazyInstantiation(boolean useLazyInstantiation)
setUseLazyInstantiation
in interface IndirectCollection
public int size()
size
in interface Collection<E>
size
in interface Set<E>
Set.size()
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in interface Set<E>
Set.toArray()
public <E> E[] toArray(E[] a)
toArray
in interface Collection<E>
toArray
in interface Set<E>
Set.toArray(java.lang.Object[])
public String toString()
toString
in class Object
AbstractCollection.toString()
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
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference