Class TypedValueField
- java.lang.Object
-
- org.camunda.bpm.engine.impl.persistence.entity.util.TypedValueField
-
- All Implemented Interfaces:
DbEntityLifecycleAware,CommandContextListener
public class TypedValueField extends java.lang.Object implements DbEntityLifecycleAware, CommandContextListener
A field what provide a typed version of a value. It can be used in an entity which implementsValueFields.- Author:
- Philipp Ossler
-
-
Field Summary
Fields Modifier and Type Field Description protected TypedValuecachedValueprotected java.lang.StringerrorMessageprotected static EnginePersistenceLoggerLOGprotected booleannotifyOnImplicitUpdatesprotected TypedValueSerializer<?>serializerprotected java.lang.StringserializerNameprotected java.util.List<TypedValueUpdateListener>updateListenersprotected ValueFieldsvalueFields
-
Constructor Summary
Constructors Constructor Description TypedValueField(ValueFields valueFields, boolean notifyOnImplicitUpdates)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddImplicitUpdateListener(TypedValueUpdateListener listener)voidclear()protected voidensureSerializerInitialized()protected static VariableSerializersgetCurrentPaSerializers()java.lang.StringgetErrorMessage()If the variable value could not be loaded, this returns the error message.static TypedValueSerializer<?>getFallbackSerializer(java.lang.String serializerName)TypedValueSerializer<?>getSerializer()java.lang.StringgetSerializerName()static VariableSerializersgetSerializers()TypedValuegetTypedValue(boolean asTransientValue)TypedValuegetTypedValue(boolean deserializeValue, boolean asTransientValue)java.lang.StringgetTypeName()java.lang.ObjectgetValue()booleanisMutable()protected booleanisMutableValue(TypedValue value)protected booleanisValuedImplicitlyUpdated()voidnotifyImplicitValueUpdate()voidonCommandContextClose(CommandContext commandContext)voidonCommandFailed(CommandContext commandContext, java.lang.Throwable t)voidpostLoad()voidsetSerializerName(java.lang.String serializerName)TypedValuesetValue(TypedValue value)protected voidwriteValue(TypedValue value, ValueFields valueFields)
-
-
-
Field Detail
-
LOG
protected static final EnginePersistenceLogger LOG
-
serializerName
protected java.lang.String serializerName
-
serializer
protected TypedValueSerializer<?> serializer
-
cachedValue
protected TypedValue cachedValue
-
errorMessage
protected java.lang.String errorMessage
-
valueFields
protected final ValueFields valueFields
-
notifyOnImplicitUpdates
protected boolean notifyOnImplicitUpdates
-
updateListeners
protected java.util.List<TypedValueUpdateListener> updateListeners
-
-
Constructor Detail
-
TypedValueField
public TypedValueField(ValueFields valueFields, boolean notifyOnImplicitUpdates)
-
-
Method Detail
-
getValue
public java.lang.Object getValue()
-
getTypedValue
public TypedValue getTypedValue(boolean asTransientValue)
-
getTypedValue
public TypedValue getTypedValue(boolean deserializeValue, boolean asTransientValue)
-
setValue
public TypedValue setValue(TypedValue value)
-
isMutable
public boolean isMutable()
-
isMutableValue
protected boolean isMutableValue(TypedValue value)
-
isValuedImplicitlyUpdated
protected boolean isValuedImplicitlyUpdated()
-
writeValue
protected void writeValue(TypedValue value, ValueFields valueFields)
-
onCommandContextClose
public void onCommandContextClose(CommandContext commandContext)
- Specified by:
onCommandContextClosein interfaceCommandContextListener
-
notifyImplicitValueUpdate
public void notifyImplicitValueUpdate()
-
onCommandFailed
public void onCommandFailed(CommandContext commandContext, java.lang.Throwable t)
- Specified by:
onCommandFailedin interfaceCommandContextListener
-
getSerializer
public TypedValueSerializer<?> getSerializer()
-
ensureSerializerInitialized
protected void ensureSerializerInitialized()
-
getSerializers
public static VariableSerializers getSerializers()
-
getFallbackSerializer
public static TypedValueSerializer<?> getFallbackSerializer(java.lang.String serializerName)
-
getCurrentPaSerializers
protected static VariableSerializers getCurrentPaSerializers()
-
getSerializerName
public java.lang.String getSerializerName()
-
setSerializerName
public void setSerializerName(java.lang.String serializerName)
-
addImplicitUpdateListener
public void addImplicitUpdateListener(TypedValueUpdateListener listener)
-
getTypeName
public java.lang.String getTypeName()
- Returns:
- the type name of the value
-
getErrorMessage
public java.lang.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:
postLoadin interfaceDbEntityLifecycleAware
-
clear
public void clear()
-
-