public class IndirectSet extends java.lang.Object implements java.util.Set, IndirectContainer, java.lang.Cloneable, java.io.Serializable
To use an IndirectSet:
Implementation notes:
CollectionMapping
,
Serialized FormModifier 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(java.util.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(java.lang.Object o) |
boolean |
addAll(java.util.Collection c) |
protected java.util.Set |
buildDelegate()
Return the freshly-built delegate.
|
void |
clear() |
java.lang.Object |
clone() |
protected java.util.Set |
cloneDelegate()
Clone the delegate.
|
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection c) |
boolean |
equals(java.lang.Object o) |
protected java.util.Set |
getDelegate()
Check whether the contents have been read from the database.
|
java.lang.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.
|
java.util.Iterator |
iterator() |
protected void |
raiseAddChangeEvent(java.lang.Object element)
Raise the add change event and relationship maintainence.
|
protected void |
raiseRemoveChangeEvent(java.lang.Object element)
Raise the remove change event.
|
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection c) |
boolean |
retainAll(java.util.Collection c) |
void |
setTopLinkAttributeName(java.lang.String attributeName)
Set the mapping attribute name, used to raise change events.
|
void |
setValueHolder(ValueHolderInterface valueHolder)
Set the value holder.
|
int |
size() |
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] a) |
java.lang.String |
toString()
Use the delegate's #toString(); but wrap it with braces to indicate
there is a bit of indirection.
|
protected int initialCapacity
protected float loadFactor
public IndirectSet()
public IndirectSet(int initialCapacity)
initialCapacity
- the initial capacity of the setjava.lang.IllegalArgumentException
- if the specified initial capacity
is negativepublic IndirectSet(int initialCapacity, float loadFactor)
initialCapacity
- the initial capacity of the setloadFactor
- the load factor of the setjava.lang.IllegalArgumentException
- if the specified initial capacity
is negativepublic IndirectSet(java.util.Collection c)
c
- the initial elements of the setpublic boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.Set
Set.add(java.lang.Object)
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.Set
Set.addAll(java.util.Collection)
protected java.util.Set buildDelegate()
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.Set
Set.clear()
public java.lang.Object clone()
clone
in class java.lang.Object
This will result in a database query if necessary.
protected java.util.Set cloneDelegate()
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.Set
Set.contains(java.lang.Object)
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.Set
Set.containsAll(java.util.Collection)
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection
equals
in interface java.util.Set
equals
in class java.lang.Object
Set.equals(java.lang.Object)
protected java.util.Set getDelegate()
public ValueHolderInterface getValueHolder()
getValueHolder
in interface IndirectContainer
public boolean hasBeenRegistered()
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.Set
hashCode
in class java.lang.Object
Set.hashCode()
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.Set
Set.isEmpty()
public boolean isInstantiated()
isInstantiated
in interface IndirectContainer
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.Set
Set.iterator()
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.Set
Set.remove(java.lang.Object)
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.Set
Set.removeAll(java.util.Collection)
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.Set
Set.retainAll(java.util.Collection)
public void setValueHolder(ValueHolderInterface valueHolder)
setValueHolder
in interface IndirectContainer
public int size()
size
in interface java.util.Collection
size
in interface java.util.Set
Set.size()
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
Set.toArray()
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
Set.toArray(java.lang.Object[])
public java.lang.String toString()
toString
in class java.lang.Object
AbstractCollection.toString()
protected void raiseAddChangeEvent(java.lang.Object element)
protected void raiseRemoveChangeEvent(java.lang.Object element)
public java.lang.String getTopLinkAttributeName()
public void setTopLinkAttributeName(java.lang.String attributeName)