|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kodo.util.AbstractLRSProxyMap
A map proxy designed for maps backed by extremely large result sets in
which each call to get(java.lang.Object)
or containsKey(java.lang.Object)
may perform a
database query. Changes to the map are tracked through a
ChangeTracker
. This map has the following limitations:
size
method may return Integer.MAX_VALUE
.
Inner classes inherited from class java.util.Map |
Map.Entry |
Constructor Summary | |
AbstractLRSProxyMap(Class keyType,
Class valueType)
|
Method Summary | |
void |
added(Object val)
Notify the tracker that the given object was added. |
void |
changed(Object val)
Notify the tracker that the given object was changed. |
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object val)
|
Object |
copy(Object orig)
Return an unproxied copy of the given instance. |
protected abstract int |
count()
Return the number of entries in the map, or Integer.MAX_VALUE . |
Set |
entrySet()
|
boolean |
evaluate(Object obj)
|
Object |
get(Object key)
|
Collection |
getAdded()
Return the collection of values that need to be added to the managed container. |
Collection |
getChanged()
Return the set of elements that have changed. |
ChangeTracker |
getChangeTracker()
Return the change tracker for this proxy, or null if none. |
int |
getNextSequence()
The next element sequence value for this proxy at load time. |
KodoStateManager |
getOwner()
Return the owning object. |
int |
getOwnerField()
Return the owning field index. |
Collection |
getRemoved()
Return the set of values that need to be removed from the managed container. |
protected abstract boolean |
hasKey(Object key)
Return whether the given key exists in the map. |
boolean |
isEmpty()
|
boolean |
isTracking()
Return true if this tracker has an up-to-date view of all the changes to the container it is managing. |
protected abstract Iterator |
itr()
Implement this method to return an iterator over the entries in the map. |
protected abstract Collection |
keys(Object value)
Return all keys for the given value. |
Set |
keySet()
|
Object |
put(Object key,
Object value)
|
void |
putAll(Map m)
|
Object |
remove(Object key)
|
void |
removed(Object val)
Notify the tracker that the given object was removed. |
void |
setNextSequence(int seq)
The maximum element sequence value for this proxy at load time. |
void |
setOwner(KodoStateManager sm,
int field)
Reset the state of the proxy, and set the owning JDO instance of the proxy and the name of the field it is assigned to. |
int |
size()
|
void |
startTracking()
Reset the state of the change tracker, and turn change tracking back on if it has been disabled. |
void |
stopTracking()
Tell the tracker to stop tracking changes for its container. |
protected abstract Object |
value(Object key)
Return the value of the given key. |
Collection |
values()
|
protected Object |
writeReplace()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
Constructor Detail |
public AbstractLRSProxyMap(Class keyType, Class valueType)
Method Detail |
public void setOwner(KodoStateManager sm, int field)
Proxy
setOwner
in interface Proxy
public KodoStateManager getOwner()
Proxy
getOwner
in interface Proxy
public int getOwnerField()
Proxy
getOwnerField
in interface Proxy
public ChangeTracker getChangeTracker()
Proxy
getChangeTracker
in interface Proxy
public Object copy(Object orig)
Proxy
copy
in interface Proxy
public int size()
size
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public boolean containsKey(Object key)
containsKey
in interface Map
public boolean containsValue(Object val)
containsValue
in interface Map
public Object get(Object key)
get
in interface Map
public Object put(Object key, Object value)
put
in interface Map
public void putAll(Map m)
putAll
in interface Map
public Object remove(Object key)
remove
in interface Map
public void clear()
clear
in interface Map
public Set keySet()
keySet
in interface Map
public Collection values()
values
in interface Map
public Set entrySet()
entrySet
in interface Map
protected Object writeReplace() throws ObjectStreamException
protected abstract boolean hasKey(Object key)
protected abstract Collection keys(Object value)
protected abstract Object value(Object key)
protected abstract Iterator itr()
Map.Entry
interface. This method may be invoked multiple
times. The iterator does not have to support the
Iterator.remove()
method, and may implement
Closeable
.protected abstract int count()
Integer.MAX_VALUE
.public boolean evaluate(Object obj)
evaluate
in interface com.solarmetric.apache.commons.collections.Predicate
public boolean isTracking()
ChangeTracker
isTracking
in interface ChangeTracker
public void startTracking()
ChangeTracker
startTracking
in interface ChangeTracker
public void stopTracking()
ChangeTracker
stopTracking
in interface ChangeTracker
public Collection getAdded()
ChangeTracker
getAdded
in interface ChangeTracker
public Collection getRemoved()
ChangeTracker
getRemoved
in interface ChangeTracker
public Collection getChanged()
ChangeTracker
getChanged
in interface ChangeTracker
public void added(Object val)
ChangeTracker
added
in interface ChangeTracker
public void removed(Object val)
ChangeTracker
removed
in interface ChangeTracker
public void changed(Object val)
ChangeTracker
changed
in interface ChangeTracker
public int getNextSequence()
ChangeTracker
getNextSequence
in interface ChangeTracker
public void setNextSequence(int seq)
ChangeTracker
setNextSequence
in interface ChangeTracker
|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |