Class DataObjectInstanceVariableContainerImpl
- java.lang.Object
-
- com.flowable.dataobject.engine.impl.runtime.DataObjectInstanceVariableContainerImpl
-
- All Implemented Interfaces:
DataObjectInstanceVariableContainer,org.flowable.common.engine.api.variable.VariableContainer
public class DataObjectInstanceVariableContainerImpl extends java.lang.Object implements DataObjectInstanceVariableContainer
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.Object>dataprotected java.util.Set<java.lang.String>definedFieldsprotected java.lang.StringdefinitionIdprotected java.lang.StringdefinitionKeyprotected java.lang.Objectidprotected booleanisDeletedprotected booleanisInsertedprotected booleanisUpdatedprotected java.lang.ObjectlookupIdValueprotected java.lang.ObjectoriginalPersistentStateprotected java.lang.StringtenantId
-
Constructor Summary
Constructors Constructor Description DataObjectInstanceVariableContainerImpl(java.util.Map<java.lang.String,java.lang.Object> data, java.lang.Object lookupIdValue, java.lang.String tenantId, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel objectModel)DataObjectInstanceVariableContainerImpl(java.util.Map<java.lang.String,java.lang.Object> data, java.lang.Object lookupIdValue, java.lang.String definitionId, java.lang.String tenantId, java.lang.String definitionKey, ServiceRegistryDataObjectModel objectModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDefinitionId()Returns the id of the master data definition this instance belongs to.java.lang.StringgetDefinitionKey()Returns the key of the master data definition this instance belongs to.java.lang.ObjectgetId()java.lang.ObjectgetLookupId()Returns the lookup id of this data object instance, which needs to be unique only within the same data object definition and source.java.lang.ObjectgetOriginalPersistentState()java.lang.ObjectgetPersistentState()java.lang.StringgetTenantId()The tenant id of the definition<T> TgetValue(java.lang.String property, java.lang.Class<T> valueType)Get a value for the givenpropertywith the givevalueTypebooleanhasValue(java.lang.String property)Check whether the data object instance has the given propertybooleanisDeleted()booleanisInserted()booleanisUpdated()java.lang.Iterable<java.lang.String>propertyNames()An iterable of all the names of the properties for this data object instance.<T> TremoveValue(java.lang.String property, java.lang.Class<T> propertyClass)voidsetDeleted(boolean isDeleted)voidsetId(java.lang.Object id)voidsetInserted(boolean isInserted)voidsetOriginalPersistentState(java.lang.Object persistentState)voidsetTransientVariable(java.lang.String variableName, java.lang.Object variableValue)voidsetUpdated(boolean isUpdated)<T> voidsetValue(java.lang.String property, T value)java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.flowable.dataobject.api.runtime.DataObjectInstanceVariableContainer
getBoolean, getDate, getDouble, getInteger, getLong, getString, getVariable, hasVariable, removeValue, setVariable
-
-
-
-
Field Detail
-
id
protected java.lang.Object id
-
data
protected final java.util.Map<java.lang.String,java.lang.Object> data
-
lookupIdValue
protected java.lang.Object lookupIdValue
-
definitionId
protected final java.lang.String definitionId
-
tenantId
protected final java.lang.String tenantId
-
definitionKey
protected final java.lang.String definitionKey
-
definedFields
protected final java.util.Set<java.lang.String> definedFields
-
isInserted
protected boolean isInserted
-
isUpdated
protected boolean isUpdated
-
isDeleted
protected boolean isDeleted
-
originalPersistentState
protected java.lang.Object originalPersistentState
-
-
Constructor Detail
-
DataObjectInstanceVariableContainerImpl
public DataObjectInstanceVariableContainerImpl(java.util.Map<java.lang.String,java.lang.Object> data, java.lang.Object lookupIdValue, java.lang.String tenantId, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel objectModel)
-
DataObjectInstanceVariableContainerImpl
public DataObjectInstanceVariableContainerImpl(java.util.Map<java.lang.String,java.lang.Object> data, java.lang.Object lookupIdValue, java.lang.String definitionId, java.lang.String tenantId, java.lang.String definitionKey, ServiceRegistryDataObjectModel objectModel)
-
-
Method Detail
-
getId
public java.lang.Object getId()
- Specified by:
getIdin interfaceDataObjectInstanceVariableContainer
-
setId
public void setId(java.lang.Object id)
- Specified by:
setIdin interfaceDataObjectInstanceVariableContainer
-
isInserted
public boolean isInserted()
-
setInserted
public void setInserted(boolean isInserted)
-
isUpdated
public boolean isUpdated()
-
setUpdated
public void setUpdated(boolean isUpdated)
-
isDeleted
public boolean isDeleted()
-
setDeleted
public void setDeleted(boolean isDeleted)
-
getOriginalPersistentState
public java.lang.Object getOriginalPersistentState()
-
setOriginalPersistentState
public void setOriginalPersistentState(java.lang.Object persistentState)
-
getLookupId
public java.lang.Object getLookupId()
Description copied from interface:DataObjectInstanceVariableContainerReturns the lookup id of this data object instance, which needs to be unique only within the same data object definition and source.- Specified by:
getLookupIdin interfaceDataObjectInstanceVariableContainer- Returns:
- the lookup id of this data object, as given and used by the data source managing this data object instance
-
getDefinitionId
public java.lang.String getDefinitionId()
Description copied from interface:DataObjectInstanceVariableContainerReturns the id of the master data definition this instance belongs to.- Specified by:
getDefinitionIdin interfaceDataObjectInstanceVariableContainer- Returns:
- the id of the master data definition
-
getDefinitionKey
public java.lang.String getDefinitionKey()
Description copied from interface:DataObjectInstanceVariableContainerReturns the key of the master data definition this instance belongs to.- Specified by:
getDefinitionKeyin interfaceDataObjectInstanceVariableContainer- Returns:
- the key of the master data definition
-
getValue
public <T> T getValue(java.lang.String property, java.lang.Class<T> valueType)Description copied from interface:DataObjectInstanceVariableContainerGet a value for the givenpropertywith the givevalueType- Specified by:
getValuein interfaceDataObjectInstanceVariableContainer- Type Parameters:
T- the type of the value- Parameters:
property- the name of the propertyvalueType- the type of the value- Returns:
- the value for the given property
-
hasValue
public boolean hasValue(java.lang.String property)
Description copied from interface:DataObjectInstanceVariableContainerCheck whether the data object instance has the given property- Specified by:
hasValuein interfaceDataObjectInstanceVariableContainer- Parameters:
property- the name of the property- Returns:
trueif this data object instance has a property with given name,falseotherwise
-
setValue
public <T> void setValue(java.lang.String property, T value)- Specified by:
setValuein interfaceDataObjectInstanceVariableContainer
-
removeValue
public <T> T removeValue(java.lang.String property, java.lang.Class<T> propertyClass)- Specified by:
removeValuein interfaceDataObjectInstanceVariableContainer
-
propertyNames
public java.lang.Iterable<java.lang.String> propertyNames()
Description copied from interface:DataObjectInstanceVariableContainerAn iterable of all the names of the properties for this data object instance.- Specified by:
propertyNamesin interfaceDataObjectInstanceVariableContainer- Returns:
- iterator of the properties
-
setTransientVariable
public void setTransientVariable(java.lang.String variableName, java.lang.Object variableValue)- Specified by:
setTransientVariablein interfaceorg.flowable.common.engine.api.variable.VariableContainer
-
getTenantId
public java.lang.String getTenantId()
Description copied from interface:DataObjectInstanceVariableContainerThe tenant id of the definition- Specified by:
getTenantIdin interfaceDataObjectInstanceVariableContainer- Specified by:
getTenantIdin interfaceorg.flowable.common.engine.api.variable.VariableContainer- Returns:
- the tenant id of the definition
-
getPersistentState
public java.lang.Object getPersistentState()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-