org.camunda.bpm.engine.impl.persistence.entity.util
Class TypedValueField

java.lang.Object
  extended by org.camunda.bpm.engine.impl.persistence.entity.util.TypedValueField
All Implemented Interfaces:
DbEntityLifecycleAware, CommandContextListener

public class TypedValueField
extends Object
implements DbEntityLifecycleAware, CommandContextListener

A field what provide a typed version of a value. It can be used in an entity which implements ValueFields.

Author:
Philipp Ossler

Field Summary
protected  org.camunda.bpm.engine.variable.value.TypedValue cachedValue
           
protected  String errorMessage
           
protected static EnginePersistenceLogger LOG
           
protected  boolean notifyOnImplicitUpdates
           
protected  TypedValueSerializer<?> serializer
           
protected  String serializerName
           
protected  List<TypedValueUpdateListener> updateListeners
           
protected  ValueFields valueFields
           
 
Constructor Summary
TypedValueField(ValueFields valueFields, boolean notifyOnImplicitUpdates)
           
 
Method Summary
 void addImplicitUpdateListener(TypedValueUpdateListener listener)
           
 void clear()
           
protected  void ensureSerializerInitialized()
           
protected static VariableSerializers getCurrentPaSerializers()
           
 String getErrorMessage()
          If the variable value could not be loaded, this returns the error message.
static TypedValueSerializer<?> getFallbackSerializer(String serializerName)
           
 TypedValueSerializer<?> getSerializer()
           
 String getSerializerName()
           
static VariableSerializers getSerializers()
           
 org.camunda.bpm.engine.variable.value.TypedValue getTypedValue()
           
 org.camunda.bpm.engine.variable.value.TypedValue getTypedValue(boolean deserializeValue)
           
 String getTypeName()
           
 Object getValue()
           
 boolean isMutable()
           
protected  boolean isMutableValue(org.camunda.bpm.engine.variable.value.TypedValue value)
           
protected  boolean isValuedImplicitlyUpdated()
           
 void notifyImplicitValueUpdate()
           
 void onCommandContextClose(CommandContext commandContext)
           
 void onCommandFailed(CommandContext commandContext, Throwable t)
           
 void postLoad()
           
 void setSerializerName(String serializerName)
           
 org.camunda.bpm.engine.variable.value.TypedValue setValue(org.camunda.bpm.engine.variable.value.TypedValue value)
           
protected  void writeValue(org.camunda.bpm.engine.variable.value.TypedValue value, ValueFields valueFields)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final EnginePersistenceLogger LOG

serializerName

protected String serializerName

serializer

protected TypedValueSerializer<?> serializer

cachedValue

protected org.camunda.bpm.engine.variable.value.TypedValue cachedValue

errorMessage

protected String errorMessage

valueFields

protected final ValueFields valueFields

notifyOnImplicitUpdates

protected boolean notifyOnImplicitUpdates

updateListeners

protected List<TypedValueUpdateListener> updateListeners
Constructor Detail

TypedValueField

public TypedValueField(ValueFields valueFields,
                       boolean notifyOnImplicitUpdates)
Method Detail

getValue

public Object getValue()

getTypedValue

public org.camunda.bpm.engine.variable.value.TypedValue getTypedValue()

getTypedValue

public org.camunda.bpm.engine.variable.value.TypedValue getTypedValue(boolean deserializeValue)

setValue

public org.camunda.bpm.engine.variable.value.TypedValue setValue(org.camunda.bpm.engine.variable.value.TypedValue value)

isMutable

public boolean isMutable()

isMutableValue

protected boolean isMutableValue(org.camunda.bpm.engine.variable.value.TypedValue value)

isValuedImplicitlyUpdated

protected boolean isValuedImplicitlyUpdated()

writeValue

protected void writeValue(org.camunda.bpm.engine.variable.value.TypedValue value,
                          ValueFields valueFields)

onCommandContextClose

public void onCommandContextClose(CommandContext commandContext)
Specified by:
onCommandContextClose in interface CommandContextListener

notifyImplicitValueUpdate

public void notifyImplicitValueUpdate()

onCommandFailed

public void onCommandFailed(CommandContext commandContext,
                            Throwable t)
Specified by:
onCommandFailed in interface CommandContextListener

getSerializer

public TypedValueSerializer<?> getSerializer()

ensureSerializerInitialized

protected void ensureSerializerInitialized()

getSerializers

public static VariableSerializers getSerializers()

getFallbackSerializer

public static TypedValueSerializer<?> getFallbackSerializer(String serializerName)

getCurrentPaSerializers

protected static VariableSerializers getCurrentPaSerializers()

getSerializerName

public String getSerializerName()

setSerializerName

public void setSerializerName(String serializerName)

addImplicitUpdateListener

public void addImplicitUpdateListener(TypedValueUpdateListener listener)

getTypeName

public String getTypeName()
Returns:
the type name of the value

getErrorMessage

public String getErrorMessage()
If the variable value could not be loaded, this returns the error message.

Returns:
an error message indicating why the variable value could not be loaded.

postLoad

public void postLoad()
Specified by:
postLoad in interface DbEntityLifecycleAware

clear

public void clear()


Copyright © 2017 camunda services GmbH. All rights reserved.