Class AbstractTypedValueSerializer<T extends TypedValue>
- java.lang.Object
-
- org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer<T>
-
- All Implemented Interfaces:
TypedValueSerializer<T>
- Direct Known Subclasses:
AbstractSerializableValueSerializer,FileValueSerializer,JPAVariableSerializer,NullValueSerializer,PrimitiveValueSerializer
public abstract class AbstractTypedValueSerializer<T extends TypedValue> extends java.lang.Object implements TypedValueSerializer<T>
- Author:
- Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Set<java.lang.String>BINARY_VALUE_TYPESprotected ValueTypevalueType
-
Constructor Summary
Constructors Constructor Description AbstractTypedValueSerializer(ValueType type)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancanHandle(TypedValue value)Used for auto-detecting the value type of a variable.protected abstract booleancanWriteValue(TypedValue value)java.lang.StringgetSerializationDataformat()ValueTypegetType()TheVariableTypesupportedbooleanisMutableValue(T typedValue)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.engine.impl.variable.serializer.TypedValueSerializer
convertToTypedValue, getName, readValue, writeValue
-
-
-
-
Field Detail
-
BINARY_VALUE_TYPES
public static final java.util.Set<java.lang.String> BINARY_VALUE_TYPES
-
valueType
protected ValueType valueType
-
-
Constructor Detail
-
AbstractTypedValueSerializer
public AbstractTypedValueSerializer(ValueType type)
-
-
Method Detail
-
getType
public ValueType getType()
Description copied from interface:TypedValueSerializerTheVariableTypesupported- Specified by:
getTypein interfaceTypedValueSerializer<T extends TypedValue>- Returns:
- the VariableType supported
-
getSerializationDataformat
public java.lang.String getSerializationDataformat()
- Specified by:
getSerializationDataformatin interfaceTypedValueSerializer<T extends TypedValue>- Returns:
- the dataformat used by the serializer or null if this is not an object serializer
-
canHandle
public boolean canHandle(TypedValue value)
Description copied from interface:TypedValueSerializerUsed for auto-detecting the value type of a variable. An implementation must return true if it is able to write values of the provided type.- Specified by:
canHandlein interfaceTypedValueSerializer<T extends TypedValue>- Parameters:
value- the value- Returns:
- true if this
TypedValueSerializeris able to handle the provided value
-
canWriteValue
protected abstract boolean canWriteValue(TypedValue value)
-
isMutableValue
public boolean isMutableValue(T typedValue)
- Specified by:
isMutableValuein interfaceTypedValueSerializer<T extends TypedValue>- Returns:
- whether values serialized by this serializer can be mutable and should be re-serialized if changed
-
-