Class JPAEntityListVariableType

java.lang.Object
org.activiti.engine.impl.variable.JPAEntityListVariableType
All Implemented Interfaces:
CacheableVariable, VariableType
Direct Known Subclasses:
HistoricJPAEntityListVariableType

public class JPAEntityListVariableType extends Object implements VariableType, CacheableVariable
Variable type capable of storing a list of reference to JPA-entities. Only JPA-Entities which are configured by annotations are supported. Use of compound primary keys is not supported.
The variable value should be of type List and can only contain objects of the same type.
  • Field Details

  • Constructor Details

    • JPAEntityListVariableType

      public JPAEntityListVariableType()
  • Method Details

    • setForceCacheable

      public void setForceCacheable(boolean forceCachedValue)
      Specified by:
      setForceCacheable in interface CacheableVariable
    • getTypeName

      public String getTypeName()
      Description copied from interface: VariableType
      name of variable type (limited to 100 characters length)
      Specified by:
      getTypeName in interface VariableType
    • isCachable

      public boolean isCachable()
      Description copied from interface: VariableType

      Indicates if this variable type supports caching.

      If caching is supported, the result of VariableType.getValue(ValueFields) is saved for the duration of the session and used for subsequent reads of the variable's value.

      If caching is not supported, all reads of a variable's value require a fresh call to VariableType.getValue(ValueFields).

      Specified by:
      isCachable in interface VariableType
      Returns:
      whether variables of this type are cacheable.
    • isAbleToStore

      public boolean isAbleToStore(Object value)
      Specified by:
      isAbleToStore in interface VariableType
      Returns:
      whether this variable type can store the specified value.
    • setValue

      public void setValue(Object value, ValueFields valueFields)
      Description copied from interface: VariableType
      Stores the specified value in the supplied ValueFields.
      Specified by:
      setValue in interface VariableType
    • getValue

      public Object getValue(ValueFields valueFields)
      Specified by:
      getValue in interface VariableType
      Returns:
      the value of a variable based on the specified ValueFields.
    • serializeIds

      protected byte[] serializeIds(List<String> ids)
      Returns:
      a bytearray containing all ID's in the given string serialized as an array.
    • deserializeIds

      protected String[] deserializeIds(byte[] bytes)