Package com.pnfsoftware.jeb.core
Class UserDataSupport
java.lang.Object
com.pnfsoftware.jeb.core.UserDataSupport
- All Implemented Interfaces:
IUserDataSupport
Standard implementation of the user-data support decorator interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearAllData(Object key) Remove all pieces of custom unit data.Retrieve a map containing all key-value pairs of of custom unit data.Retrieve a piece of custom unit data.voidStore a piece of custom unit data.
-
Constructor Details
-
UserDataSupport
public UserDataSupport()
-
-
Method Details
-
setData
Description copied from interface:IUserDataSupportStore a piece of custom unit data.- Specified by:
setDatain interfaceIUserDataSupport- Parameters:
key- non-null keyvalue- optional value (may be null)persist- if false, the piece of data is transient and will not be persisted to disk when saving the project to a JEB database; if true, the piece of data will be persisted, in which case, user of this method must ensure that both key and value areserializable; if unsure, it is recommended to either not persist the data, or if persistence is a requirement, use only key/value types that are guaranteed to be persisted, such as any basic types (String, boxed primitive types, primitive types, arrays or lists of those, etc.)
-
getData
Description copied from interface:IUserDataSupportRetrieve a piece of custom unit data.- Specified by:
getDatain interfaceIUserDataSupport- Parameters:
key- non-null key- Returns:
- value (null may indicate that the key-value pair is not present or that the stored value is null)
-
clearAllData
Description copied from interface:IUserDataSupportRemove all pieces of custom unit data.- Specified by:
clearAllDatain interfaceIUserDataSupport
-
getAllData
Description copied from interface:IUserDataSupportRetrieve a map containing all key-value pairs of of custom unit data.- Specified by:
getAllDatain interfaceIUserDataSupport- Returns:
- a map
-