public class DataObjectInstanceVariableContainerImpl extends Object implements DataObjectInstanceVariableContainer
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
data |
protected Set<String> |
definedFields |
protected String |
definitionId |
protected String |
definitionKey |
protected Object |
id |
protected boolean |
isDeleted |
protected boolean |
isInserted |
protected boolean |
isUpdated |
protected Object |
lookupIdValue |
protected Object |
originalPersistentState |
protected String |
tenantId |
Constructor and 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) |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getData() |
String |
getDefinitionId()
Returns the id of the master data definition this instance belongs to.
|
String |
getDefinitionKey()
Returns the key of the master data definition this instance belongs to.
|
Object |
getId() |
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.
|
Object |
getOriginalPersistentState() |
Object |
getPersistentState() |
String |
getTenantId()
The tenant id of the definition
|
<T> T |
getValue(String property,
Class<T> valueType)
Get a value for the given
property with the give valueType |
boolean |
hasValue(String property)
Check whether the data object instance has the given property
|
boolean |
isDeleted() |
boolean |
isInserted() |
boolean |
isUpdated() |
Iterable<String> |
propertyNames()
An iterable of all the names of the properties for this data object instance.
|
<T> T |
removeValue(String property,
Class<T> propertyClass) |
void |
setDeleted(boolean isDeleted) |
void |
setId(Object id) |
void |
setInserted(boolean isInserted) |
void |
setOriginalPersistentState(Object persistentState) |
void |
setTransientVariable(String variableName,
Object variableValue) |
void |
setUpdated(boolean isUpdated) |
<T> void |
setValue(String property,
T value) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBoolean, getDate, getDouble, getInteger, getLong, getString, getVariable, hasVariable, removeValue, setVariable
protected Object id
protected Object lookupIdValue
protected final String definitionId
protected final String tenantId
protected final String definitionKey
protected boolean isInserted
protected boolean isUpdated
protected boolean isDeleted
protected Object originalPersistentState
public DataObjectInstanceVariableContainerImpl(Map<String,Object> data, Object lookupIdValue, String tenantId, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel objectModel)
public Object getId()
getId
in interface DataObjectInstanceVariableContainer
public void setId(Object id)
setId
in interface DataObjectInstanceVariableContainer
public boolean isInserted()
public void setInserted(boolean isInserted)
public boolean isUpdated()
public void setUpdated(boolean isUpdated)
public boolean isDeleted()
public void setDeleted(boolean isDeleted)
public Object getOriginalPersistentState()
public void setOriginalPersistentState(Object persistentState)
public Object getLookupId()
DataObjectInstanceVariableContainer
getLookupId
in interface DataObjectInstanceVariableContainer
public String getDefinitionId()
DataObjectInstanceVariableContainer
getDefinitionId
in interface DataObjectInstanceVariableContainer
public String getDefinitionKey()
DataObjectInstanceVariableContainer
getDefinitionKey
in interface DataObjectInstanceVariableContainer
public <T> T getValue(String property, Class<T> valueType)
DataObjectInstanceVariableContainer
property
with the give valueType
getValue
in interface DataObjectInstanceVariableContainer
T
- the type of the valueproperty
- the name of the propertyvalueType
- the type of the valuepublic boolean hasValue(String property)
DataObjectInstanceVariableContainer
hasValue
in interface DataObjectInstanceVariableContainer
property
- the name of the propertytrue
if this data object instance has a property with given name, false
otherwisepublic <T> void setValue(String property, T value)
setValue
in interface DataObjectInstanceVariableContainer
public <T> T removeValue(String property, Class<T> propertyClass)
removeValue
in interface DataObjectInstanceVariableContainer
public Iterable<String> propertyNames()
DataObjectInstanceVariableContainer
propertyNames
in interface DataObjectInstanceVariableContainer
public void setTransientVariable(String variableName, Object variableValue)
setTransientVariable
in interface VariableContainer
public String getTenantId()
DataObjectInstanceVariableContainer
getTenantId
in interface DataObjectInstanceVariableContainer
getTenantId
in interface VariableContainer
public Map<String,Object> getData()
getData
in interface DataObjectInstanceVariableContainer
public Object getPersistentState()