Class DataObjectInstanceVariableContainerImpl
- java.lang.Object
-
- com.flowable.dataobject.engine.impl.runtime.DataObjectInstanceVariableContainerImpl
-
- All Implemented Interfaces:
DataObjectInstanceVariableContainer,VariableContainer
public class DataObjectInstanceVariableContainerImpl extends Object implements DataObjectInstanceVariableContainer
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Object>dataprotected Set<String>definedFieldsprotected StringdefinitionIdprotected StringdefinitionKeyprotected Objectidprotected booleanisDeletedprotected booleanisInsertedprotected booleanisUpdatedprotected ObjectlookupIdValueprotected ObjectoriginalPersistentStateprotected StringtenantId
-
Constructor Summary
Constructors Constructor Description DataObjectInstanceVariableContainerImpl(Map<String,Object> data, Object lookupIdValue, String tenantId, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel objectModel)DataObjectInstanceVariableContainerImpl(Map<String,Object> data, Object lookupIdValue, String definitionId, String tenantId, String definitionKey, ServiceRegistryDataObjectModel objectModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>getData()StringgetDefinitionId()Returns the id of the master data definition this instance belongs to.StringgetDefinitionKey()Returns the key of the master data definition this instance belongs to.ObjectgetId()ObjectgetLookupId()Returns the lookup id of this data object instance, which needs to be unique only within the same data object definition and source.ObjectgetOriginalPersistentState()ObjectgetPersistentState()StringgetTenantId()The tenant id of the definition<T> TgetValue(String property, Class<T> valueType)Get a value for the givenpropertywith the givevalueTypebooleanhasValue(String property)Check whether the data object instance has the given propertybooleanisDeleted()booleanisInserted()booleanisUpdated()Iterable<String>propertyNames()An iterable of all the names of the properties for this data object instance.<T> TremoveValue(String property, Class<T> propertyClass)voidsetDeleted(boolean isDeleted)voidsetId(Object id)voidsetInserted(boolean isInserted)voidsetOriginalPersistentState(Object persistentState)voidsetTransientVariable(String variableName, Object variableValue)voidsetUpdated(boolean isUpdated)<T> voidsetValue(String property, T value)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, getLocalDate, getLong, getString, getVariable, hasVariable, removeValue, setVariable
-
-
-
-
Field Detail
-
id
protected Object id
-
lookupIdValue
protected Object lookupIdValue
-
definitionId
protected final String definitionId
-
tenantId
protected final String tenantId
-
definitionKey
protected final String definitionKey
-
isInserted
protected boolean isInserted
-
isUpdated
protected boolean isUpdated
-
isDeleted
protected boolean isDeleted
-
originalPersistentState
protected Object originalPersistentState
-
-
Constructor Detail
-
DataObjectInstanceVariableContainerImpl
public DataObjectInstanceVariableContainerImpl(Map<String,Object> data, Object lookupIdValue, String tenantId, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel objectModel)
-
-
Method Detail
-
getId
public Object getId()
- Specified by:
getIdin interfaceDataObjectInstanceVariableContainer
-
setId
public void setId(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 Object getOriginalPersistentState()
-
setOriginalPersistentState
public void setOriginalPersistentState(Object persistentState)
-
getLookupId
public 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 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 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(String property, 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(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(String property, T value)
- Specified by:
setValuein interfaceDataObjectInstanceVariableContainer
-
removeValue
public <T> T removeValue(String property, Class<T> propertyClass)
- Specified by:
removeValuein interfaceDataObjectInstanceVariableContainer
-
propertyNames
public Iterable<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(String variableName, Object variableValue)
- Specified by:
setTransientVariablein interfaceVariableContainer
-
getTenantId
public String getTenantId()
Description copied from interface:DataObjectInstanceVariableContainerThe tenant id of the definition- Specified by:
getTenantIdin interfaceDataObjectInstanceVariableContainer- Specified by:
getTenantIdin interfaceVariableContainer- Returns:
- the tenant id of the definition
-
getData
public Map<String,Object> getData()
- Specified by:
getDatain interfaceDataObjectInstanceVariableContainer
-
getPersistentState
public Object getPersistentState()
-
-