org.camunda.bpm.engine.impl.core.variable.type
Class AbstractValueTypeImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.core.variable.type.AbstractValueTypeImpl
All Implemented Interfaces:
Serializable, ValueType
Direct Known Subclasses:
ObjectTypeImpl, PrimitiveValueTypeImpl

public abstract class AbstractValueTypeImpl
extends Object
implements ValueType

Author:
Thorben Lindhauer
See Also:
Serialized Form

Field Summary
protected  String name
           
 
Fields inherited from interface org.camunda.bpm.engine.variable.type.ValueType
BOOLEAN, BYTES, DATE, DOUBLE, INTEGER, LONG, NULL, NUMBER, OBJECT, SHORT, STRING
 
Constructor Summary
AbstractValueTypeImpl(String name)
           
 
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.
 String getName()
          Returns the name of the variable type
 ValueType getParent()
          Gets the parent value type.
 boolean isAbstract()
          Returns whether the value type is abstract.
 String toString()
           
protected  ProcessEngineException unsupportedConversion(ValueType typeToConvertTo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.camunda.bpm.engine.variable.type.ValueType
createValue, getValueInfo, isPrimitiveValueType
 

Field Detail

name

protected String name
Constructor Detail

AbstractValueTypeImpl

public AbstractValueTypeImpl(String name)
Method Detail

getName

public String getName()
Description copied from interface: ValueType
Returns the name of the variable type

Specified by:
getName in interface ValueType

toString

public String toString()
Overrides:
toString in class Object

isAbstract

public boolean isAbstract()
Description copied from interface: ValueType

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.

Specified by:
isAbstract in interface ValueType

getParent

public ValueType getParent()
Description copied from interface: ValueType

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 ValueType.isAbstract() returns true.

Specified by:
getParent in interface ValueType

canConvertFromTypedValue

public boolean canConvertFromTypedValue(TypedValue typedValue)
Description copied from interface: ValueType
Determines whether the argument typed value can be converted to a typed value of this value type.

Specified by:
canConvertFromTypedValue in interface ValueType

convertFromTypedValue

public TypedValue convertFromTypedValue(TypedValue typedValue)
Description copied from interface: ValueType
Converts a typed value to a typed value of this type. This does not suceed if ValueType.canConvertFromTypedValue(TypedValue) returns false.

Specified by:
convertFromTypedValue in interface ValueType

unsupportedConversion

protected ProcessEngineException unsupportedConversion(ValueType typeToConvertTo)


Copyright © 2015 camunda services GmbH. All rights reserved.