org.camunda.bpm.engine.variable.type
Interface ValueType

All Superinterfaces:
Serializable
All Known Subinterfaces:
PrimitiveValueType, SerializableValueType
All Known Implementing Classes:
AbstractValueTypeImpl, ObjectTypeImpl, PrimitiveValueTypeImpl, PrimitiveValueTypeImpl.BooleanTypeImpl, PrimitiveValueTypeImpl.BytesTypeImpl, PrimitiveValueTypeImpl.DateTypeImpl, PrimitiveValueTypeImpl.DoubleTypeImpl, PrimitiveValueTypeImpl.IntegerTypeImpl, PrimitiveValueTypeImpl.LongTypeImpl, PrimitiveValueTypeImpl.NullTypeImpl, PrimitiveValueTypeImpl.NumberTypeImpl, PrimitiveValueTypeImpl.ShortTypeImpl, PrimitiveValueTypeImpl.StringTypeImpl

public interface ValueType
extends Serializable

Since:
7.2
Author:
Thorben Lindhauer, Daniel Meyer

Field Summary
static PrimitiveValueType BOOLEAN
           
static PrimitiveValueType BYTES
           
static PrimitiveValueType DATE
           
static PrimitiveValueType DOUBLE
           
static PrimitiveValueType INTEGER
           
static PrimitiveValueType LONG
           
static PrimitiveValueType NULL
           
static PrimitiveValueType NUMBER
           
static SerializableValueType OBJECT
           
static PrimitiveValueType SHORT
           
static PrimitiveValueType STRING
           
 
Method Summary
 boolean canConvertFromTypedValue(TypedValue typedValue)
          Determines whether the argument typed value can be converted to a typed value of this value type.
 TypedValue convertFromTypedValue(TypedValue typedValue)
          Converts a typed value to a typed value of this type.
 TypedValue createValue(Object value, Map<String,Object> valueInfo)
          Creates a new TypedValue using this type.
 String getName()
          Returns the name of the variable type
 ValueType getParent()
          Gets the parent value type.
 Map<String,Object> getValueInfo(TypedValue typedValue)
          Get the value info for a TypedValue.
 boolean isAbstract()
          Returns whether the value type is abstract.
 boolean isPrimitiveValueType()
          Indicates whether this type is primitive valued.
 

Field Detail

NULL

static final PrimitiveValueType NULL

BOOLEAN

static final PrimitiveValueType BOOLEAN

SHORT

static final PrimitiveValueType SHORT

LONG

static final PrimitiveValueType LONG

DOUBLE

static final PrimitiveValueType DOUBLE

STRING

static final PrimitiveValueType STRING

INTEGER

static final PrimitiveValueType INTEGER

DATE

static final PrimitiveValueType DATE

BYTES

static final PrimitiveValueType BYTES

NUMBER

static final PrimitiveValueType NUMBER

OBJECT

static final SerializableValueType OBJECT
Method Detail

getName

String getName()
Returns the name of the variable type


isPrimitiveValueType

boolean isPrimitiveValueType()
Indicates whether this type is primitive valued. Primitive valued types can be handled natively by the process engine.

Returns:
true if this is a primitive valued type. False otherwise

getValueInfo

Map<String,Object> getValueInfo(TypedValue typedValue)
Get the value info for a TypedValue.

Parameters:
typedValue -
Returns:

createValue

TypedValue createValue(Object value,
                       Map<String,Object> valueInfo)
Creates a new TypedValue using this type.

Parameters:
value - the value
Returns:
the typed value for the value

getParent

ValueType getParent()

Gets the parent value type.

Value type hierarchy is only relevant for queries and has the following meaning: When a value query is made (e.g. all tasks with a certain variable value), a "child" type's value also matches a parameter value of the parent type. This is only supported when the parent value type's implementation of isAbstract() returns true.


canConvertFromTypedValue

boolean canConvertFromTypedValue(TypedValue typedValue)
Determines whether the argument typed value can be converted to a typed value of this value type.


convertFromTypedValue

TypedValue convertFromTypedValue(TypedValue typedValue)
Converts a typed value to a typed value of this type. This does not suceed if canConvertFromTypedValue(TypedValue) returns false.


isAbstract

boolean isAbstract()

Returns whether the value type is abstract. This is not related to the term abstract in the Java language.

Abstract value types cannot be used as types for variables but only used for querying.



Copyright © 2015 camunda services GmbH. All rights reserved.