Package org.jivesoftware.util
Class PersistableMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
org.jivesoftware.util.PersistableMap<K,V>
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<K,
V>
- Direct Known Subclasses:
DefaultGroupPropertyMap
This acts as a tag interface. It has no functionality, but it serves to make more clear the
intention to pass around a special type of map.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
PersistableMap
public PersistableMap()
-
-
Method Details
-
put
Custom method to put properties into the map, optionally without triggering persistence. This is used when the map is being initially loaded from the database.- Parameters:
key
- The property namevalue
- The property valuepersist
- True if the changes should be persisted to the database- Returns:
- The original value or null if the property did not exist
-