public class IndirectSet extends Object implements Set, IndirectContainer, Cloneable, Serializable
To use an IndirectSet:
Implementation notes:
CollectionMapping,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected int |
initialCapacity
Store initial size for lazy init.
|
protected float |
loadFactor
Store load factor for lazy init.
|
| Constructor and Description |
|---|
IndirectSet()
Construct an empty IndirectSet.
|
IndirectSet(Collection 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 |
|---|---|
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
protected Set |
buildDelegate()
Return the freshly-built delegate.
|
void |
clear() |
Object |
clone() |
protected Set |
cloneDelegate()
Clone the delegate.
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
boolean |
equals(Object o) |
protected Set |
getDelegate()
Check whether the contents have been read from the database.
|
String |
getTopLinkAttributeName()
Return the mapping attribute name, used to raise change events.
|
ValueHolderInterface |
getValueHolder()
Return the valueHolder.
|
boolean |
hasBeenRegistered()
INTERNAL:
Return whether this IndirectSet has been registered in a UnitOfWork
|
int |
hashCode() |
boolean |
isEmpty() |
boolean |
isInstantiated()
Return whether the contents have been read from the database.
|
Iterator |
iterator() |
protected void |
raiseAddChangeEvent(Object element)
Raise the add change event and relationship maintainence.
|
protected void |
raiseRemoveChangeEvent(Object element)
Raise the remove change event.
|
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
boolean |
retainAll(Collection c) |
void |
setTopLinkAttributeName(String attributeName)
Set the mapping attribute name, used to raise change events.
|
void |
setValueHolder(ValueHolderInterface valueHolder)
Set the value holder.
|
int |
size() |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
String |
toString()
Use the delegate's #toString(); but wrap it with braces to indicate
there is a bit of indirection.
|
finalize, getClass, notify, notifyAll, wait, wait, waitspliteratorparallelStream, removeIf, streamprotected int initialCapacity
protected float loadFactor
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 c)
c - the initial elements of the setpublic boolean add(Object o)
add in interface Collectionadd in interface SetSet.add(java.lang.Object)public boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface SetSet.addAll(java.util.Collection)protected Set buildDelegate()
public void clear()
clear in interface Collectionclear in interface SetSet.clear()public Object clone()
clone in class ObjectThis will result in a database query if necessary.protected Set cloneDelegate()
public boolean contains(Object o)
contains in interface Collectioncontains in interface SetSet.contains(java.lang.Object)public boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface SetSet.containsAll(java.util.Collection)public boolean equals(Object o)
equals in interface Collectionequals in interface Setequals in class ObjectSet.equals(java.lang.Object)protected Set getDelegate()
public ValueHolderInterface getValueHolder()
getValueHolder in interface IndirectContainerpublic boolean hasBeenRegistered()
public int hashCode()
hashCode in interface CollectionhashCode in interface SethashCode in class ObjectSet.hashCode()public boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface SetSet.isEmpty()public boolean isInstantiated()
isInstantiated in interface IndirectContainerpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface SetSet.iterator()public boolean remove(Object o)
remove in interface Collectionremove in interface SetSet.remove(java.lang.Object)public boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface SetSet.removeAll(java.util.Collection)public boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface SetSet.retainAll(java.util.Collection)public void setValueHolder(ValueHolderInterface valueHolder)
setValueHolder in interface IndirectContainerpublic int size()
size in interface Collectionsize in interface SetSet.size()public Object[] toArray()
toArray in interface CollectiontoArray in interface SetSet.toArray()public Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface SetSet.toArray(java.lang.Object[])public String toString()
toString in class ObjectAbstractCollection.toString()protected void raiseAddChangeEvent(Object element)
protected void raiseRemoveChangeEvent(Object element)
public String getTopLinkAttributeName()
public void setTopLinkAttributeName(String attributeName)
Copyright © 2023. All rights reserved.