|
||||||||||
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 TrackableCollectionIF
public void selfAdded()
TrackableCollectionIF
selfAdded
in interface TrackableCollectionIF
public Collection getAdded()
TrackableCollectionIF
getAdded
in interface TrackableCollectionIF
public Collection getRemoved()
TrackableCollectionIF
getRemoved
in interface TrackableCollectionIF
public boolean addWithTracking(Object _o)
TrackableCollectionIF
addWithTracking
in interface TrackableCollectionIF
public boolean removeWithTracking(Object _o)
TrackableCollectionIF
removeWithTracking
in interface TrackableCollectionIF
public void clearWithTracking()
TrackableCollectionIF
clearWithTracking
in interface TrackableCollectionIF
public void clear()
clear
in interface Collection
clear
in interface Set
clear
in class HashSet
public boolean add(Object o)
add
in interface Collection
add
in interface Set
add
in class HashSet
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface Set
addAll
in class AbstractCollection
public boolean remove(Object o)
remove
in interface Collection
remove
in interface Set
remove
in class HashSet
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface Set
removeAll
in class AbstractSet
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface Set
retainAll
in class AbstractCollection
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface Set
iterator
in class HashSet
public boolean contains(Object o)
contains
in interface Collection
contains
in interface Set
contains
in class HashSet
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface Set
containsAll
in class AbstractCollection
public boolean equals(Object o)
equals
in interface Collection
equals
in interface Set
equals
in class AbstractSet
public int hashCode()
hashCode
in interface Collection
hashCode
in interface Set
hashCode
in class AbstractSet
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface Set
isEmpty
in class HashSet
public int size()
size
in interface Collection
size
in interface Set
size
in class HashSet
public Object[] toArray()
toArray
in interface Collection
toArray
in interface Set
toArray
in class AbstractCollection
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface Set
toArray
in class AbstractCollection
public boolean isLoaded()
protected void loadField()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |