|
Oracle TopLink Java API Reference 10g Release 3 (10.1.3.1) B28219-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.toplink.indirection.IndirectSet
IndirectSet is an example implementation of the Set protocol that allows a domain class to take advantage of TopLink Indirection without having to declare its instance variable as a ValueHolderInterface.
To use an IndirectSet:
TopLink will place an IndirectSet in the instance variable when the containing domain object is read from the datatabase. With the first message sent to the IndirectSet, the contents are fetched from the database and normal Set behavior is resumed.
Implementation notes:
CollectionMapping, Serialized Form| Constructor Summary | |
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. |
|
| Method Summary | |
boolean |
add(java.lang.Object element) |
boolean |
addAll(java.util.Collection c) |
void |
clear() |
java.lang.Object |
clone() |
boolean |
contains(java.lang.Object element) |
boolean |
containsAll(java.util.Collection c) |
boolean |
equals(java.lang.Object o) |
ValueHolderInterface |
getValueHolder()PUBLIC: Return the valueHolder. |
int |
hashCode() |
boolean |
isEmpty() |
boolean |
isInstantiated()Return whether the contents have been read from the database. |
java.util.Iterator |
iterator() |
boolean |
remove(java.lang.Object element) |
boolean |
removeAll(java.util.Collection c) |
boolean |
retainAll(java.util.Collection c) |
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. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public IndirectSet()
public IndirectSet(int initialCapacity)
initialCapacity - the initial capacity of the setjava.lang.IllegalArgumentException - if the specified initial capacity is negative
public 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 set| Method Detail |
public boolean add(java.lang.Object element)
add in interface java.util.SetSet.add(java.lang.Object)public boolean addAll(java.util.Collection c)
addAll in interface java.util.SetSet.addAll(java.util.Collection)public void clear()
clear in interface java.util.SetSet.clear()public java.lang.Object clone()
This will result in a database query if necessary.public boolean contains(java.lang.Object element)
contains in interface java.util.SetSet.contains(java.lang.Object)public boolean containsAll(java.util.Collection c)
containsAll in interface java.util.SetSet.containsAll(java.util.Collection)public boolean equals(java.lang.Object o)
equals in interface java.util.SetSet.equals(java.lang.Object)public ValueHolderInterface getValueHolder()
getValueHolder in interface IndirectContainerpublic int hashCode()
hashCode in interface java.util.SetSet.hashCode()public boolean isEmpty()
isEmpty in interface java.util.SetSet.isEmpty()public boolean isInstantiated()
isInstantiated in interface IndirectContainerpublic java.util.Iterator iterator()
iterator in interface java.util.SetSet.iterator()public boolean remove(java.lang.Object element)
remove in interface java.util.SetSet.remove(java.lang.Object)public boolean removeAll(java.util.Collection c)
removeAll in interface java.util.SetSet.removeAll(java.util.Collection)public boolean retainAll(java.util.Collection c)
retainAll in interface java.util.SetSet.retainAll(java.util.Collection)public void setValueHolder(ValueHolderInterface valueHolder)
setValueHolder in interface IndirectContainerpublic int size()
size in interface java.util.SetSet.size()public java.lang.Object[] toArray()
toArray in interface java.util.SetSet.toArray()public java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.SetSet.toArray(java.lang.Object[])public java.lang.String toString()
AbstractCollection.toString()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||