Package org.apache.openjpa.util
Class MapChangeTrackerImpl
java.lang.Object
org.apache.openjpa.util.AbstractChangeTracker
org.apache.openjpa.util.MapChangeTrackerImpl
- All Implemented Interfaces:
ChangeTracker
,MapChangeTracker
Default
MapChangeTracker
.- Author:
- Abe White
-
Field Summary
Fields inherited from class org.apache.openjpa.util.AbstractChangeTracker
add, change, rem
-
Constructor Summary
ConstructorDescriptionMapChangeTrackerImpl
(Map map, boolean autoOff) Constructor; supply delegate map. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Mark the given value as added.void
Record that the given entry was added to the map.protected void
Mark the given value as changed.void
Record that the given entry was altered.boolean
Whether to track keys or values.protected void
Mark the given value as removed.void
Record that the given entry was removed from the map.void
setTrackKeys
(boolean keys) Whether to track keys or values.Methods inherited from class org.apache.openjpa.util.AbstractChangeTracker
added, changed, getAdded, getAutoOff, getChanged, getNextSequence, getRemoved, initialSequence, isTracking, newSet, removed, reset, setAutoOff, setNextSequence, startTracking, stopTracking
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.openjpa.util.ChangeTracker
getAdded, getChanged, getNextSequence, getRemoved, isTracking, setNextSequence, startTracking, stopTracking
-
Constructor Details
-
MapChangeTrackerImpl
Constructor; supply delegate map.
-
-
Method Details
-
getTrackKeys
public boolean getTrackKeys()Description copied from interface:MapChangeTracker
Whether to track keys or values. Defaults to keys. If you set to values, it is assumed there is a 1-1 correlation between keys and values in this map.- Specified by:
getTrackKeys
in interfaceMapChangeTracker
-
setTrackKeys
public void setTrackKeys(boolean keys) Description copied from interface:MapChangeTracker
Whether to track keys or values. Defaults to keys. If you set to values, it is assumed there is a 1-1 correlation between keys and values in this map.- Specified by:
setTrackKeys
in interfaceMapChangeTracker
-
added
Description copied from interface:MapChangeTracker
Record that the given entry was added to the map.- Specified by:
added
in interfaceMapChangeTracker
-
removed
Description copied from interface:MapChangeTracker
Record that the given entry was removed from the map.- Specified by:
removed
in interfaceMapChangeTracker
-
changed
Description copied from interface:MapChangeTracker
Record that the given entry was altered.- Specified by:
changed
in interfaceMapChangeTracker
-
add
Description copied from class:AbstractChangeTracker
Mark the given value as added.- Specified by:
add
in classAbstractChangeTracker
-
remove
Description copied from class:AbstractChangeTracker
Mark the given value as removed.- Specified by:
remove
in classAbstractChangeTracker
-
change
Description copied from class:AbstractChangeTracker
Mark the given value as changed.- Specified by:
change
in classAbstractChangeTracker
-