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>
data
protected java.util.Set<java.lang.String>
definedFields
protected java.lang.String
definitionId
protected java.lang.String
definitionKey
protected java.lang.Object
id
protected boolean
isDeleted
protected boolean
isInserted
protected boolean
isUpdated
protected java.lang.Object
lookupIdValue
protected java.lang.Object
originalPersistentState
protected java.lang.String
tenantId
-
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
Modifier and Type Method Description java.lang.String
getDefinitionId()
Returns the id of the master data definition this instance belongs to.java.lang.String
getDefinitionKey()
Returns the key of the master data definition this instance belongs to.java.lang.Object
getId()
java.lang.Object
getLookupId()
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.Object
getOriginalPersistentState()
java.lang.Object
getPersistentState()
java.lang.String
getTenantId()
The tenant id of the definition<T> T
getValue(java.lang.String property, java.lang.Class<T> valueType)
Get a value for the givenproperty
with the givevalueType
boolean
hasValue(java.lang.String property)
Check whether the data object instance has the given propertyboolean
isDeleted()
boolean
isInserted()
boolean
isUpdated()
java.lang.Iterable<java.lang.String>
propertyNames()
An iterable of all the names of the properties for this data object instance.<T> T
removeValue(java.lang.String property, java.lang.Class<T> propertyClass)
void
setDeleted(boolean isDeleted)
void
setId(java.lang.Object id)
void
setInserted(boolean isInserted)
void
setOriginalPersistentState(java.lang.Object persistentState)
void
setTransientVariable(java.lang.String variableName, java.lang.Object variableValue)
void
setUpdated(boolean isUpdated)
<T> void
setValue(java.lang.String property, T value)
java.lang.String
toString()
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 Details
-
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 Details
-
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 Details
-
getId
public java.lang.Object getId()- Specified by:
getId
in interfaceDataObjectInstanceVariableContainer
-
setId
public void setId(java.lang.Object id)- Specified by:
setId
in 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:DataObjectInstanceVariableContainer
Returns the lookup id of this data object instance, which needs to be unique only within the same data object definition and source.- Specified by:
getLookupId
in 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:DataObjectInstanceVariableContainer
Returns the id of the master data definition this instance belongs to.- Specified by:
getDefinitionId
in interfaceDataObjectInstanceVariableContainer
- Returns:
- the id of the master data definition
-
getDefinitionKey
public java.lang.String getDefinitionKey()Description copied from interface:DataObjectInstanceVariableContainer
Returns the key of the master data definition this instance belongs to.- Specified by:
getDefinitionKey
in 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:DataObjectInstanceVariableContainer
Get a value for the givenproperty
with the givevalueType
- Specified by:
getValue
in 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:DataObjectInstanceVariableContainer
Check whether the data object instance has the given property- Specified by:
hasValue
in interfaceDataObjectInstanceVariableContainer
- Parameters:
property
- the name of the property- Returns:
true
if this data object instance has a property with given name,false
otherwise
-
setValue
public <T> void setValue(java.lang.String property, T value)- Specified by:
setValue
in interfaceDataObjectInstanceVariableContainer
-
removeValue
public <T> T removeValue(java.lang.String property, java.lang.Class<T> propertyClass)- Specified by:
removeValue
in interfaceDataObjectInstanceVariableContainer
-
propertyNames
public java.lang.Iterable<java.lang.String> propertyNames()Description copied from interface:DataObjectInstanceVariableContainer
An iterable of all the names of the properties for this data object instance.- Specified by:
propertyNames
in interfaceDataObjectInstanceVariableContainer
- Returns:
- iterator of the properties
-
setTransientVariable
public void setTransientVariable(java.lang.String variableName, java.lang.Object variableValue)- Specified by:
setTransientVariable
in interfaceorg.flowable.common.engine.api.variable.VariableContainer
-
getTenantId
public java.lang.String getTenantId()Description copied from interface:DataObjectInstanceVariableContainer
The tenant id of the definition- Specified by:
getTenantId
in interfaceDataObjectInstanceVariableContainer
- Specified by:
getTenantId
in 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:
toString
in classjava.lang.Object
-