SolarMetric Kodo JDO 3.0.3 generated on February 20 2004

kodo.util
Class AbstractLRSProxyMap

java.lang.Object
  |
  +--kodo.util.AbstractLRSProxyMap
All Implemented Interfaces:
ChangeTracker, LRSProxy, Map, org.apache.commons.collections.Predicate, Proxy
Direct Known Subclasses:
AbstractMapFieldMapping.LRSProxyMap

public abstract synchronized class AbstractLRSProxyMap
extends Object
implements Map, LRSProxy, ChangeTracker, org.apache.commons.collections.Predicate


Inner classes inherited from class java.util.Map
Map.Entry
 
Constructor Summary
AbstractLRSProxyMap(Class, Class)
           
 
Method Summary
 void added(Object)
          Notify the tracker that the given object was added.
 void changed(Object)
          Notify the tracker that the given object was changed.
 void clear()
           
 boolean containsKey(Object)
           
 boolean containsValue(Object)
           
 Object copy(Object)
          Return an unproxied copy of the given instance.
protected abstract  int count()
           
 Set entrySet()
           
 boolean evaluate(Object)
           
 Object get(Object)
           
 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)
           
 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()
           
protected abstract  Collection keys(Object)
           
 Set keySet()
           
 Object put(Object, Object)
           
 void putAll(Map)
           
 Object remove(Object)
           
 void removed(Object)
          Notify the tracker that the given object was removed.
 void setNextSequence(int)
          The maximum element sequence value for this proxy at load time.
 void setOwner(KodoStateManager, int)
          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)
           
 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

AbstractLRSProxyMap

public AbstractLRSProxyMap(Class,
                           Class)
Method Detail

setOwner

public void setOwner(KodoStateManager,
                     int)
Description copied from interface: Proxy
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. Set to null to indicate that the proxy is no longer managed.
Specified by:
setOwner in interface Proxy

getOwner

public KodoStateManager getOwner()
Description copied from interface: Proxy
Return the owning object.
Specified by:
getOwner in interface Proxy

getOwnerField

public int getOwnerField()
Description copied from interface: Proxy
Return the owning field index.
Specified by:
getOwnerField in interface Proxy

getChangeTracker

public ChangeTracker getChangeTracker()
Description copied from interface: Proxy
Return the change tracker for this proxy, or null if none.
Specified by:
getChangeTracker in interface Proxy

copy

public Object copy(Object)
Description copied from interface: Proxy
Return an unproxied copy of the given instance. This method is used by proxy managers to create backup values for use in rollback.
Specified by:
copy in interface Proxy

size

public int size()
Specified by:
size in interface Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map

containsKey

public boolean containsKey(Object)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object)
Specified by:
containsValue in interface Map

get

public Object get(Object)
Specified by:
get in interface Map

put

public Object put(Object,
                  Object)
Specified by:
put in interface Map

putAll

public void putAll(Map)
Specified by:
putAll in interface Map

remove

public Object remove(Object)
Specified by:
remove in interface Map

clear

public void clear()
Specified by:
clear in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

values

public Collection values()
Specified by:
values in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

writeReplace

protected Object writeReplace()
                       throws ObjectStreamException

hasKey

protected abstract boolean hasKey(Object)

keys

protected abstract Collection keys(Object)

value

protected abstract Object value(Object)

itr

protected abstract Iterator itr()

count

protected abstract int count()

evaluate

public boolean evaluate(Object)
Specified by:
evaluate in interface org.apache.commons.collections.Predicate

isTracking

public boolean isTracking()
Description copied from interface: ChangeTracker
Return true if this tracker has an up-to-date view of all the changes to the container it is managing.
Specified by:
isTracking in interface ChangeTracker

startTracking

public void startTracking()
Description copied from interface: ChangeTracker
Reset the state of the change tracker, and turn change tracking back on if it has been disabled.
Specified by:
startTracking in interface ChangeTracker

stopTracking

public void stopTracking()
Description copied from interface: ChangeTracker
Tell the tracker to stop tracking changes for its container.
Specified by:
stopTracking in interface ChangeTracker

getAdded

public Collection getAdded()
Description copied from interface: ChangeTracker
Return the collection of values that need to be added to the managed container.
Specified by:
getAdded in interface ChangeTracker

getRemoved

public Collection getRemoved()
Description copied from interface: ChangeTracker
Return the set of values that need to be removed from the managed container.
Specified by:
getRemoved in interface ChangeTracker

getChanged

public Collection getChanged()
Description copied from interface: ChangeTracker
Return the set of elements that have changed. In maps, this marks a possible change in value for a key. In collections, this marks an element that has been removed and re-added.
Specified by:
getChanged in interface ChangeTracker

added

public void added(Object)
Description copied from interface: ChangeTracker
Notify the tracker that the given object was added.
Specified by:
added in interface ChangeTracker

removed

public void removed(Object)
Description copied from interface: ChangeTracker
Notify the tracker that the given object was removed.
Specified by:
removed in interface ChangeTracker

changed

public void changed(Object)
Description copied from interface: ChangeTracker
Notify the tracker that the given object was changed.
Specified by:
changed in interface ChangeTracker

getNextSequence

public int getNextSequence()
Description copied from interface: ChangeTracker
The next element sequence value for this proxy at load time. If the data store keeps this proxy's data in sequence order but allows holes for removed objects, the implementation can set the next sequence at load time, then retrieve it and start from there for added objects at flush time. This value is set back to 0 if the proxy stops tracking changes. It is set to the proxy's size when the proxy starts tracking changes again.
Specified by:
getNextSequence in interface ChangeTracker

setNextSequence

public void setNextSequence(int)
Description copied from interface: ChangeTracker
The maximum element sequence value for this proxy at load time. If the data store keeps this proxy's data in sequence order but allows holes for removed objects, the implementation can set the next sequence at load time, then retrieve it and start from there for added objects at flush time. This value is set back to 0 if the proxy stops tracking changes. It is set to the proxy's size when the proxy starts tracking changes again.
Specified by:
setNextSequence in interface ChangeTracker

SolarMetric Kodo JDO 3.0.3 generated on February 20 2004

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.