| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.util.AbstractChangeTracker
public abstract class AbstractChangeTracker
Base class that provides utilities to change trackers.
| Field Summary | |
|---|---|
| protected  java.util.Collection | addCollection of added items. | 
| protected  java.util.Collection | changeCollection of changed items. | 
| protected  java.util.Collection | remCollection of removed items. | 
| Constructor Summary | |
|---|---|
| AbstractChangeTracker()Constructor; supply configuration. | |
| Method Summary | |
|---|---|
| protected abstract  void | add(java.lang.Object val)Mark the given value as added. | 
| protected  void | added(java.lang.Object val)Notify the tracker that the given object was added. | 
| protected abstract  void | change(java.lang.Object val)Mark the given value as changed. | 
| protected  void | changed(java.lang.Object val)Notify the tracker that the given object was changed. | 
|  java.util.Collection | getAdded()Return the collection of values that need to be added to the managed container. | 
|  boolean | getAutoOff()Whether to automatically stop tracking when the number of changes exceeds the container size. | 
|  java.util.Collection | getChanged()Return the set of elements that have changed. | 
|  int | getNextSequence()The next element sequence value for this proxy at load time. | 
|  java.util.Collection | getRemoved()Return the set of values that need to be removed from the managed container. | 
| protected  int | initialSequence()Return the initial sequence value for this proxy. | 
|  boolean | isTracking()Return true if this tracker has an up-to-date view of all the changes to the container it is managing. | 
| protected  java.util.Set | newSet()Create a new set for storing adds/removes/changes. | 
| protected abstract  void | remove(java.lang.Object val)Mark the given value as removed. | 
| protected  void | removed(java.lang.Object val)Notify the tracker that the given object was removed. | 
| protected  void | reset()Reset the state of the tracker. | 
|  void | setAutoOff(boolean autoOff)Whether to automatically stop tracking when the number of changes exceeds the container size. | 
|  void | setNextSequence(int seq)The maximum element sequence value for this proxy at load time. | 
|  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. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected java.util.Collection add
protected java.util.Collection rem
protected java.util.Collection change
| Constructor Detail | 
|---|
public AbstractChangeTracker()
| Method Detail | 
|---|
public boolean getAutoOff()
public void setAutoOff(boolean autoOff)
public boolean isTracking()
ChangeTracker
isTracking in interface ChangeTrackerpublic void startTracking()
ChangeTracker
startTracking in interface ChangeTrackerprotected int initialSequence()
public void stopTracking()
ChangeTracker
stopTracking in interface ChangeTrackerprotected void reset()
public java.util.Collection getAdded()
ChangeTracker
getAdded in interface ChangeTrackerpublic java.util.Collection getRemoved()
ChangeTracker
getRemoved in interface ChangeTrackerpublic java.util.Collection getChanged()
ChangeTracker
getChanged in interface ChangeTrackerprotected void added(java.lang.Object val)
protected abstract void add(java.lang.Object val)
protected void removed(java.lang.Object val)
protected abstract void remove(java.lang.Object val)
protected void changed(java.lang.Object val)
protected abstract void change(java.lang.Object val)
public int getNextSequence()
ChangeTracker
getNextSequence in interface ChangeTrackerpublic void setNextSequence(int seq)
ChangeTracker
setNextSequence in interface ChangeTrackerprotected java.util.Set newSet()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||