|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet
net.ontopia.persistence.proxy.TrackableLazySet
public class TrackableLazySet
INTERNAL: A set implementation that track the changes performed on it. It keeps track of the objects that have been added and the ones that has been removed. What makes this implementation different from TrackableSet is that the field value is only loaded from the storage when it is actually needed.
| Field Summary | |
|---|---|
protected java.util.Set |
added
|
protected int |
field
|
protected IdentityIF |
identity
|
protected boolean |
loaded
|
protected java.util.Set |
removed
|
protected TransactionIF |
txn
|
| Constructor Summary | |
|---|---|
TrackableLazySet(TransactionIF txn,
IdentityIF identity,
int field)
|
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
boolean |
addWithTracking(java.lang.Object _o)
INTERNAL: Adds the item to the collection tracking the change. |
void |
clear()
|
void |
clearWithTracking()
INTERNAL: Removes all items from the collection tracking the changes. |
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
void |
dump()
|
boolean |
equals(java.lang.Object o)
|
java.util.Collection |
getAdded()
INTERNAL: Gets the objects that have been added to the set. |
java.util.Collection |
getRemoved()
INTERNAL: Gets the objects that have been removed from the set. |
int |
hashCode()
|
boolean |
isEmpty()
|
boolean |
isLoaded()
|
java.util.Iterator |
iterator()
|
protected void |
loadField()
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
boolean |
removeWithTracking(java.lang.Object _o)
INTERNAL: Removes the item from the collection tracking the change. |
void |
resetTracking()
INTERNAL: Clears the list of added and removed objects without touching the original collection. |
boolean |
retainAll(java.util.Collection c)
|
void |
selfAdded()
INTERNAL: Consider existing collection elements as having just been added. |
int |
size()
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
| Methods inherited from class java.util.HashSet |
|---|
clone |
| Methods inherited from class java.util.AbstractCollection |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected TransactionIF txn
protected IdentityIF identity
protected int field
protected boolean loaded
protected java.util.Set added
protected java.util.Set removed
| Constructor Detail |
|---|
public TrackableLazySet(TransactionIF txn,
IdentityIF identity,
int field)
| Method Detail |
|---|
public void dump()
public void resetTracking()
TrackableCollectionIF
resetTracking in interface TrackableCollectionIFpublic void selfAdded()
TrackableCollectionIF
selfAdded in interface TrackableCollectionIFpublic java.util.Collection getAdded()
TrackableCollectionIF
getAdded in interface TrackableCollectionIFpublic java.util.Collection getRemoved()
TrackableCollectionIF
getRemoved in interface TrackableCollectionIFpublic boolean addWithTracking(java.lang.Object _o)
TrackableCollectionIF
addWithTracking in interface TrackableCollectionIFpublic boolean removeWithTracking(java.lang.Object _o)
TrackableCollectionIF
removeWithTracking in interface TrackableCollectionIFpublic void clearWithTracking()
TrackableCollectionIF
clearWithTracking in interface TrackableCollectionIFpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Setclear in class java.util.HashSetpublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Setadd in class java.util.HashSetpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.SetaddAll in class java.util.AbstractCollectionpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Setremove in class java.util.HashSetpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.SetremoveAll in class java.util.AbstractSetpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.SetretainAll in class java.util.AbstractCollectionpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setiterator in class java.util.HashSetpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Setcontains in class java.util.HashSetpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.SetcontainsAll in class java.util.AbstractCollectionpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collectionequals in interface java.util.Setequals in class java.util.AbstractSetpublic int hashCode()
hashCode in interface java.util.CollectionhashCode in interface java.util.SethashCode in class java.util.AbstractSetpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.SetisEmpty in class java.util.HashSetpublic int size()
size in interface java.util.Collectionsize in interface java.util.Setsize in class java.util.HashSetpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.SettoArray in class java.util.AbstractCollectionpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.CollectiontoArray in interface java.util.SettoArray in class java.util.AbstractCollectionpublic boolean isLoaded()
protected void loadField()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||