|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.persistence.indirection.IndirectSet
public class 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:
Implementation notes:
CollectionMapping,
Serialized Form| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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(Object element)
|
boolean |
addAll(Collection c)
|
void |
clear()
|
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 |
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 |
setValueHolder(ValueHolderInterface valueHolder)
INTERNAL: 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. |
| 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 set
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 set
IllegalArgumentException - if the specified initial capacity
is negativepublic IndirectSet(Collection c)
c - the initial elements of the set| Method Detail |
|---|
public boolean add(Object element)
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)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.public boolean contains(Object element)
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)public Object getDelegateObject()
getDelegateObject in interface IndirectCollectionpublic 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 element)
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()public PropertyChangeListener _persistence_getPropertyChangeListener()
_persistence_getPropertyChangeListener in interface ChangeTrackerpublic boolean hasTrackedPropertyChangeListener()
public void _persistence_setPropertyChangeListener(PropertyChangeListener changeListener)
_persistence_setPropertyChangeListener in interface ChangeTrackerpublic String getTrackedAttributeName()
getTrackedAttributeName in interface CollectionChangeTrackerpublic void setTrackedAttributeName(String attributeName)
setTrackedAttributeName in interface CollectionChangeTrackerpublic Collection getRemovedElements()
getRemovedElements in interface IndirectCollectionpublic Collection getAddedElements()
getAddedElements in interface IndirectCollectionpublic boolean hasAddedElements()
public boolean hasRemovedElements()
public boolean hasDeferredChanges()
hasDeferredChanges in interface IndirectCollection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||