# Interface: com.pnfsoftware.jeb.core.IUserDataSupport

This decorator interface is used to let users know that arbitrary data objects may be attached to the object. The attached objects \(both keys and values\) must be [serializable](Ser) since this interface is itself serializable.

## Method: clearAllData
- parameter: `key`, type: `java.lang.Object`

Description: Remove all pieces of custom unit data.
parameter: key: ignored parameter kept for compatibility

## Method: getAllData
- return type: `java.util.Map<java.lang.Object,java.lang.Object>`

Description: Retrieve a map containing all key\-value pairs of of custom unit data.
return: a map

## Method: getData
- parameter: `key`, type: `java.lang.Object`
- return type: `java.lang.Object`

Description: Retrieve a piece of custom unit data.
parameter: key: non\-null key
return: value \(null may indicate that the key\-value pair is not present or that the stored         value is null\)

## Method: setData
- parameter: `key`, type: `java.lang.Object`
- parameter: `value`, type: `java.lang.Object`
- parameter: `persist`, type: `boolean`

Description: Store a piece of custom unit data.
parameter: key: non\-null key
parameter: value: optional value \(may be null\)
parameter: 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](Ser); 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.\)

