public class IndirectSet extends Object implements Set, IndirectContainer, Cloneable, 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(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, wait
spliterator
parallelStream, removeIf, stream
protected 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 Collection
add
in interface Set
Set.add(java.lang.Object)
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface Set
Set.addAll(java.util.Collection)
protected Set buildDelegate()
public void clear()
clear
in interface Collection
clear
in interface Set
Set.clear()
public Object clone()
clone
in class Object
This will result in a database query if necessary.
protected Set cloneDelegate()
public boolean contains(Object o)
contains
in interface Collection
contains
in interface Set
Set.contains(java.lang.Object)
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface Set
Set.containsAll(java.util.Collection)
public boolean equals(Object o)
equals
in interface Collection
equals
in interface Set
equals
in class Object
Set.equals(java.lang.Object)
protected Set getDelegate()
public ValueHolderInterface getValueHolder()
getValueHolder
in interface IndirectContainer
public boolean hasBeenRegistered()
public int hashCode()
hashCode
in interface Collection
hashCode
in interface Set
hashCode
in class Object
Set.hashCode()
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface Set
Set.isEmpty()
public boolean isInstantiated()
isInstantiated
in interface IndirectContainer
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface Set
Set.iterator()
public boolean remove(Object o)
remove
in interface Collection
remove
in interface Set
Set.remove(java.lang.Object)
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface Set
Set.removeAll(java.util.Collection)
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface Set
Set.retainAll(java.util.Collection)
public void setValueHolder(ValueHolderInterface valueHolder)
setValueHolder
in interface IndirectContainer
public int size()
size
in interface Collection
size
in interface Set
Set.size()
public Object[] toArray()
toArray
in interface Collection
toArray
in interface Set
Set.toArray()
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface Set
Set.toArray(java.lang.Object[])
public String toString()
toString
in class Object
AbstractCollection.toString()
protected void raiseAddChangeEvent(Object element)
protected void raiseRemoveChangeEvent(Object element)
public String getTopLinkAttributeName()
public void setTopLinkAttributeName(String attributeName)
Copyright © 2024. All rights reserved.