org.camunda.bpm.engine.impl.persistence.entity
Class VariableInstanceEntity

java.lang.Object
  extended by org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity
All Implemented Interfaces:
Serializable, CoreVariableInstance, DbEntity, DbEntityLifecycleAware, HasDbRevision, CommandContextListener, ValueFields, VariableInstance

public class VariableInstanceEntity
extends Object
implements VariableInstance, CoreVariableInstance, ValueFields, DbEntity, DbEntityLifecycleAware, HasDbRevision, Serializable, CommandContextListener

Author:
Tom Baeyens
See Also:
Serialized Form

Field Summary
protected  String activityInstanceId
           
protected  ByteArrayEntity byteArrayValue
           
protected  String byteArrayValueId
           
protected  TypedValue cachedValue
           
protected  String caseExecutionId
           
protected  String caseInstanceId
           
protected  String configuration
           
protected  Double doubleValue
           
protected  String errorMessage
           
protected  String executionId
           
protected  String id
           
protected  boolean isConcurrentLocal
          Determines whether this variable is supposed to be a local variable in case of concurrency in its scope.
protected  Long longValue
           
protected  String name
           
protected  String processInstanceId
           
protected  int revision
           
protected  long sequenceCounter
           
protected  TypedValueSerializer serializer
           
protected  String serializerName
          the name of the serializer used to serialize the value of this variable
protected  String taskId
           
protected  String textValue
           
protected  String textValue2
           
 
Constructor Summary
VariableInstanceEntity()
           
 
Method Summary
 void clearValueFields()
           
static VariableInstanceEntity create(String name, TypedValue value)
           
static VariableInstanceEntity createAndInsert(String name, TypedValue value)
           
 void delete()
           
protected  void deleteByteArrayValue()
           
protected  void ensureSerializerInitialized()
           
 boolean equals(Object obj)
           
 String getActivityInstanceId()
          Returns the corresponding activity instance id.
 ByteArrayEntity getByteArrayValue()
           
 String getByteArrayValueId()
           
 TypedValue getCachedValue()
           
 CaseExecutionEntity getCaseExecution()
           
 String getCaseExecutionId()
          Returns the corresponding case execution id.
 String getCaseInstanceId()
          Returns the corresponding case instance id.
 Double getDoubleValue()
           
 String getErrorMessage()
          If the variable value could not be loaded, this returns the error message.
 ExecutionEntity getExecution()
           
 String getExecutionId()
          Returns the corresponding execution id.
 String getId()
           
 Long getLongValue()
           
 String getName()
          Returns the name of this variable instance.
 Object getPersistentState()
          Returns a representation of the object, as would be stored in the database.
 String getProcessInstanceId()
          Returns the corresponding process instance id.
 int getRevision()
           
 int getRevisionNext()
           
 long getSequenceCounter()
           
 TypedValueSerializer<?> getSerializer()
           
 String getSerializerName()
           
static VariableSerializers getSerializers()
           
 String getTaskId()
          Returns the corresponding task id.
 String getTextValue()
           
 String getTextValue2()
           
 TypedValue getTypedValue()
          Returns the TypedValue of this variable instance.
 TypedValue getTypedValue(boolean deserializeValue)
           
 String getTypeName()
          Returns the name of the type of this variable instance
 Object getValue()
          Returns the value of this variable instance.
 String getVariableScope()
           
 int hashCode()
           
 void incrementSequenceCounter()
           
static void insert(VariableInstanceEntity variableInstance)
           
 boolean isConcurrentLocal()
           
 void onCommandContextClose(CommandContext commandContext)
           
 void onCommandFailed(CommandContext commandContext, Throwable t)
           
 void postLoad()
           
 void setActivityInstanceId(String activityInstanceId)
           
 void setByteArrayValue(byte[] bytes)
           
 void setByteArrayValueId(String byteArrayValueId)
           
 void setCaseExecutionId(String caseExecutionId)
           
 void setCaseInstanceId(String caseInstanceId)
           
 void setConcurrentLocal(boolean isConcurrentLocal)
           
 void setDoubleValue(Double doubleValue)
           
 void setExecution(ExecutionEntity execution)
           
 void setExecutionId(String executionId)
           
 void setId(String id)
           
 void setLongValue(Long longValue)
           
 void setName(String name)
           
 void setProcessInstanceId(String processInstanceId)
           
 void setRevision(int revision)
           
 void setSequenceCounter(long sequenceCounter)
           
 void setSerializer(TypedValueSerializer<?> serializer)
           
 void setSerializerName(String type)
           
 void setTaskId(String taskId)
           
 void setTextValue(String textValue)
           
 void setTextValue2(String textValue2)
           
 TypedValue setValue(TypedValue value)
           
 String toString()
           
 void updateFields()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected String id

revision

protected int revision

name

protected String name

processInstanceId

protected String processInstanceId

executionId

protected String executionId

taskId

protected String taskId

caseInstanceId

protected String caseInstanceId

caseExecutionId

protected String caseExecutionId

activityInstanceId

protected String activityInstanceId

longValue

protected Long longValue

doubleValue

protected Double doubleValue

textValue

protected String textValue

textValue2

protected String textValue2

byteArrayValue

protected ByteArrayEntity byteArrayValue

byteArrayValueId

protected String byteArrayValueId

cachedValue

protected TypedValue cachedValue

serializerName

protected String serializerName
the name of the serializer used to serialize the value of this variable


serializer

protected TypedValueSerializer serializer

errorMessage

protected String errorMessage

configuration

protected String configuration

sequenceCounter

protected long sequenceCounter

isConcurrentLocal

protected boolean isConcurrentLocal

Determines whether this variable is supposed to be a local variable in case of concurrency in its scope. This affects

In the future, this field could be used for restoring the variable distribution when the tree is expanded/compacted multiple times. On expansion, the goal would be to keep concurrentLocal variables always with their concurrent replacing executions while non-concurrentLocal variables stay in the scope execution

Constructor Detail

VariableInstanceEntity

public VariableInstanceEntity()
Method Detail

createAndInsert

public static VariableInstanceEntity createAndInsert(String name,
                                                     TypedValue value)

insert

public static void insert(VariableInstanceEntity variableInstance)

create

public static VariableInstanceEntity create(String name,
                                            TypedValue value)

delete

public void delete()

getPersistentState

public Object getPersistentState()
Description copied from interface: DbEntity
Returns a representation of the object, as would be stored in the database. Used when deciding if updates have occurred to the object or not since it was last loaded.

Specified by:
getPersistentState in interface DbEntity

getRevisionNext

public int getRevisionNext()
Specified by:
getRevisionNext in interface HasDbRevision

setProcessInstanceId

public void setProcessInstanceId(String processInstanceId)

setExecutionId

public void setExecutionId(String executionId)

setCaseInstanceId

public void setCaseInstanceId(String caseInstanceId)

setCaseExecutionId

public void setCaseExecutionId(String caseExecutionId)

getByteArrayValueId

public String getByteArrayValueId()
Specified by:
getByteArrayValueId in interface ValueFields

setByteArrayValueId

public void setByteArrayValueId(String byteArrayValueId)

getByteArrayValue

public ByteArrayEntity getByteArrayValue()
Specified by:
getByteArrayValue in interface ValueFields

setByteArrayValue

public void setByteArrayValue(byte[] bytes)
Specified by:
setByteArrayValue in interface ValueFields

deleteByteArrayValue

protected void deleteByteArrayValue()

getValue

public Object getValue()
Description copied from interface: VariableInstance
Returns the value of this variable instance.

Specified by:
getValue in interface VariableInstance

getTypedValue

public TypedValue getTypedValue()
Description copied from interface: VariableInstance
Returns the TypedValue of this variable instance.

Specified by:
getTypedValue in interface VariableInstance

getTypedValue

public TypedValue getTypedValue(boolean deserializeValue)
Specified by:
getTypedValue in interface CoreVariableInstance

setValue

public TypedValue setValue(TypedValue value)

clearValueFields

public void clearValueFields()

onCommandContextClose

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

onCommandFailed

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

updateFields

public void updateFields()

getTypeName

public String getTypeName()
Description copied from interface: VariableInstance
Returns the name of the type of this variable instance

Specified by:
getTypeName in interface VariableInstance
Returns:
the type name of the variable

postLoad

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

getExecution

public ExecutionEntity getExecution()

setExecution

public void setExecution(ExecutionEntity execution)

getCaseExecution

public CaseExecutionEntity getCaseExecution()

getId

public String getId()
Specified by:
getId in interface DbEntity
Specified by:
getId in interface VariableInstance
Returns:
the Id of this variable instance

setId

public void setId(String id)
Specified by:
setId in interface DbEntity

getTextValue

public String getTextValue()
Specified by:
getTextValue in interface ValueFields

getProcessInstanceId

public String getProcessInstanceId()
Description copied from interface: VariableInstance
Returns the corresponding process instance id.

Specified by:
getProcessInstanceId in interface VariableInstance

getExecutionId

public String getExecutionId()
Description copied from interface: VariableInstance
Returns the corresponding execution id.

Specified by:
getExecutionId in interface VariableInstance

getCaseInstanceId

public String getCaseInstanceId()
Description copied from interface: VariableInstance
Returns the corresponding case instance id.

Specified by:
getCaseInstanceId in interface VariableInstance

getCaseExecutionId

public String getCaseExecutionId()
Description copied from interface: VariableInstance
Returns the corresponding case execution id.

Specified by:
getCaseExecutionId in interface VariableInstance

getLongValue

public Long getLongValue()
Specified by:
getLongValue in interface ValueFields

setLongValue

public void setLongValue(Long longValue)
Specified by:
setLongValue in interface ValueFields

getDoubleValue

public Double getDoubleValue()
Specified by:
getDoubleValue in interface ValueFields

setDoubleValue

public void setDoubleValue(Double doubleValue)
Specified by:
setDoubleValue in interface ValueFields

setName

public void setName(String name)

setTextValue

public void setTextValue(String textValue)
Specified by:
setTextValue in interface ValueFields

getName

public String getName()
Description copied from interface: VariableInstance
Returns the name of this variable instance.

Specified by:
getName in interface CoreVariableInstance
Specified by:
getName in interface ValueFields
Specified by:
getName in interface VariableInstance

getRevision

public int getRevision()
Specified by:
getRevision in interface HasDbRevision

setRevision

public void setRevision(int revision)
Specified by:
setRevision in interface HasDbRevision

setSerializer

public void setSerializer(TypedValueSerializer<?> serializer)

setSerializerName

public void setSerializerName(String type)

getSerializer

public TypedValueSerializer<?> getSerializer()

ensureSerializerInitialized

protected void ensureSerializerInitialized()

getSerializers

public static VariableSerializers getSerializers()

getTextValue2

public String getTextValue2()
Specified by:
getTextValue2 in interface ValueFields

setTextValue2

public void setTextValue2(String textValue2)
Specified by:
setTextValue2 in interface ValueFields

getTaskId

public String getTaskId()
Description copied from interface: VariableInstance
Returns the corresponding task id.

Specified by:
getTaskId in interface VariableInstance

setTaskId

public void setTaskId(String taskId)

getActivityInstanceId

public String getActivityInstanceId()
Description copied from interface: VariableInstance
Returns the corresponding activity instance id.

Specified by:
getActivityInstanceId in interface VariableInstance

setActivityInstanceId

public void setActivityInstanceId(String activityInstanceId)

getSerializerName

public String getSerializerName()

getErrorMessage

public String getErrorMessage()
Description copied from interface: VariableInstance
If the variable value could not be loaded, this returns the error message.

Specified by:
getErrorMessage in interface VariableInstance
Returns:
an error message indicating why the variable value could not be loaded.

getVariableScope

public String getVariableScope()

getCachedValue

public TypedValue getCachedValue()

getSequenceCounter

public long getSequenceCounter()

setSequenceCounter

public void setSequenceCounter(long sequenceCounter)

incrementSequenceCounter

public void incrementSequenceCounter()

isConcurrentLocal

public boolean isConcurrentLocal()

setConcurrentLocal

public void setConcurrentLocal(boolean isConcurrentLocal)

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2015 camunda services GmbH. All rights reserved.