Package io.iworkflow.core.persistence
Class DataAttributeDef
- java.lang.Object
-
- io.iworkflow.core.persistence.DataAttributeDef
-
- All Implemented Interfaces:
PersistenceFieldDef
@Immutable public abstract class DataAttributeDef extends java.lang.Object implements PersistenceFieldDef
-
-
Constructor Summary
Constructors Constructor Description DataAttributeDef()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DataAttributeDef
create(java.lang.Class dataType, java.lang.String key)
iWF will verify if the key has been registered for the data attribute created using this method, allowing users to create only one data attribute with the same key and data type.static DataAttributeDef
createByPrefix(java.lang.Class dataType, java.lang.String keyPrefix)
iWF now supports dynamically created data attributes with a shared prefix and the same data type.abstract java.lang.Class
getDataAttributeType()
abstract java.lang.Boolean
isPrefix()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.iworkflow.core.persistence.PersistenceFieldDef
getKey
-
-
-
-
Method Detail
-
getDataAttributeType
public abstract java.lang.Class getDataAttributeType()
-
isPrefix
public abstract java.lang.Boolean isPrefix()
-
create
public static DataAttributeDef create(java.lang.Class dataType, java.lang.String key)
iWF will verify if the key has been registered for the data attribute created using this method, allowing users to create only one data attribute with the same key and data type.- Parameters:
dataType
- required.key
- required. The unique key.- Returns:
- a data attribute definition
-
createByPrefix
public static DataAttributeDef createByPrefix(java.lang.Class dataType, java.lang.String keyPrefix)
iWF now supports dynamically created data attributes with a shared prefix and the same data type. (E.g., dynamically created data attributes of type String can be named with a common prefix like: data_attribute_prefix_1: "one", data_attribute_prefix_2: "two") iWF will verify if the prefix has been registered for data attributes created using this method, allowing users to create multiple data attributes with the same prefix and data type.- Parameters:
dataType
- required.keyPrefix
- required. The common prefix of a set of keys to be created later.- Returns:
- a data attribute definition
-
-