public class DetachedDataObjectInstanceVariableContainer extends Object implements DataObjectInstanceVariableContainer
Modifier and Type | Field and Description |
---|---|
protected com.fasterxml.jackson.databind.node.ObjectNode |
data |
protected String |
definitionId |
protected String |
definitionKey |
protected Map<String,String> |
fieldNamesToType |
protected String |
lookupId |
protected String |
tenantId |
Constructor and Description |
---|
DetachedDataObjectInstanceVariableContainer(com.fasterxml.jackson.databind.node.ObjectNode data,
String lookupId,
String tenantId,
DataObjectDefinition dataObjectDefinition,
ServiceRegistryDataObjectModel objectModel) |
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.node.ObjectNode |
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.
|
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
|
protected <T> T |
nodeToValue(String property,
com.fasterxml.jackson.databind.JsonNode valueNode,
Class<T> valueType) |
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 |
setId(Object id) |
void |
setTransientVariable(String variableName,
Object variableValue) |
<T> void |
setValue(String property,
T value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBoolean, getDate, getDouble, getInteger, getLong, getString, getVariable, hasVariable, removeValue, setVariable
protected final com.fasterxml.jackson.databind.node.ObjectNode data
protected final String lookupId
protected final String definitionId
protected final String definitionKey
protected final String tenantId
public DetachedDataObjectInstanceVariableContainer(com.fasterxml.jackson.databind.node.ObjectNode data, String lookupId, String tenantId, DataObjectDefinition dataObjectDefinition, ServiceRegistryDataObjectModel objectModel)
public Object getId()
getId
in interface DataObjectInstanceVariableContainer
public void setId(Object id)
setId
in interface DataObjectInstanceVariableContainer
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 valueprotected <T> T nodeToValue(String property, com.fasterxml.jackson.databind.JsonNode valueNode, Class<T> valueType)
public 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 void setTransientVariable(String variableName, Object variableValue)
setTransientVariable
in interface VariableContainer
public String getTenantId()
DataObjectInstanceVariableContainer
getTenantId
in interface DataObjectInstanceVariableContainer
getTenantId
in interface VariableContainer
public Iterable<String> propertyNames()
DataObjectInstanceVariableContainer
propertyNames
in interface DataObjectInstanceVariableContainer
public com.fasterxml.jackson.databind.node.ObjectNode getData()
getData
in interface DataObjectInstanceVariableContainer