|
||||||||||
| 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 Set |
added
|
protected int |
field
|
protected IdentityIF |
identity
|
protected boolean |
loaded
|
protected Set |
removed
|
protected TransactionIF |
txn
|
| Constructor Summary | |
|---|---|
TrackableLazySet(TransactionIF txn,
IdentityIF identity,
int field)
|
|
| Method Summary | |
|---|---|
boolean |
add(Object o)
|
boolean |
addAll(Collection c)
|
boolean |
addWithTracking(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(Object o)
|
boolean |
containsAll(Collection c)
|
void |
dump()
|
boolean |
equals(Object o)
|
Collection |
getAdded()
INTERNAL: Gets the objects that have been added to the set. |
Collection |
getRemoved()
INTERNAL: Gets the objects that have been removed from the set. |
int |
hashCode()
|
boolean |
isEmpty()
|
boolean |
isLoaded()
|
Iterator |
iterator()
|
protected void |
loadField()
|
boolean |
remove(Object o)
|
boolean |
removeAll(Collection c)
|
boolean |
removeWithTracking(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(Collection c)
|
void |
selfAdded()
INTERNAL: Consider existing collection elements as having just been added. |
int |
size()
|
Object[] |
toArray()
|
Object[] |
toArray(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 Set added
protected 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 Collection getAdded()
TrackableCollectionIF
getAdded in interface TrackableCollectionIFpublic Collection getRemoved()
TrackableCollectionIF
getRemoved in interface TrackableCollectionIFpublic boolean addWithTracking(Object _o)
TrackableCollectionIF
addWithTracking in interface TrackableCollectionIFpublic boolean removeWithTracking(Object _o)
TrackableCollectionIF
removeWithTracking in interface TrackableCollectionIFpublic void clearWithTracking()
TrackableCollectionIF
clearWithTracking in interface TrackableCollectionIFpublic void clear()
clear in interface Collectionclear in interface Setclear in class HashSetpublic boolean add(Object o)
add in interface Collectionadd in interface Setadd in class HashSetpublic boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface SetaddAll in class AbstractCollectionpublic boolean remove(Object o)
remove in interface Collectionremove in interface Setremove in class HashSetpublic boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface SetremoveAll in class AbstractSetpublic boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface SetretainAll in class AbstractCollectionpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Setiterator in class HashSetpublic boolean contains(Object o)
contains in interface Collectioncontains in interface Setcontains in class HashSetpublic boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface SetcontainsAll in class AbstractCollectionpublic boolean equals(Object o)
equals in interface Collectionequals in interface Setequals in class AbstractSetpublic int hashCode()
hashCode in interface CollectionhashCode in interface SethashCode in class AbstractSetpublic boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface SetisEmpty in class HashSetpublic int size()
size in interface Collectionsize in interface Setsize in class HashSetpublic Object[] toArray()
toArray in interface CollectiontoArray in interface SettoArray in class AbstractCollectionpublic Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface SettoArray in class AbstractCollectionpublic boolean isLoaded()
protected void loadField()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||