Class UserDataSupport

java.lang.Object
com.pnfsoftware.jeb.core.UserDataSupport
All Implemented Interfaces:
IUserDataSupport

@Ser public class UserDataSupport extends Object implements IUserDataSupport
Standard implementation of the user-data support decorator interface.
  • Constructor Details

    • UserDataSupport

      public UserDataSupport()
  • Method Details

    • setData

      public void setData(Object key, Object value, boolean persist)
      Description copied from interface: IUserDataSupport
      Store a piece of custom unit data.
      Specified by:
      setData in interface IUserDataSupport
      Parameters:
      key - non-null key
      value - 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 are serializable; 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

      public Object getData(Object key)
      Description copied from interface: IUserDataSupport
      Retrieve a piece of custom unit data.
      Specified by:
      getData in interface IUserDataSupport
      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

      public void clearAllData(Object key)
      Description copied from interface: IUserDataSupport
      Remove all pieces of custom unit data.
      Specified by:
      clearAllData in interface IUserDataSupport
    • getAllData

      public Map<Object,Object> getAllData()
      Description copied from interface: IUserDataSupport
      Retrieve a map containing all key-value pairs of of custom unit data.
      Specified by:
      getAllData in interface IUserDataSupport
      Returns:
      a map