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, waitgetBoolean, getDate, getDouble, getInteger, getLong, getString, getVariable, hasVariable, removeValue, setVariableprotected 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 DataObjectInstanceVariableContainerpublic void setId(Object id)
setId in interface DataObjectInstanceVariableContainerpublic Object getLookupId()
DataObjectInstanceVariableContainergetLookupId in interface DataObjectInstanceVariableContainerpublic String getDefinitionId()
DataObjectInstanceVariableContainergetDefinitionId in interface DataObjectInstanceVariableContainerpublic String getDefinitionKey()
DataObjectInstanceVariableContainergetDefinitionKey in interface DataObjectInstanceVariableContainerpublic <T> T getValue(String property, Class<T> valueType)
DataObjectInstanceVariableContainerproperty with the give valueTypegetValue in interface DataObjectInstanceVariableContainerT - 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)
DataObjectInstanceVariableContainerhasValue in interface DataObjectInstanceVariableContainerproperty - 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 DataObjectInstanceVariableContainerpublic <T> T removeValue(String property, Class<T> propertyClass)
removeValue in interface DataObjectInstanceVariableContainerpublic void setTransientVariable(String variableName, Object variableValue)
setTransientVariable in interface VariableContainerpublic String getTenantId()
DataObjectInstanceVariableContainergetTenantId in interface DataObjectInstanceVariableContainergetTenantId in interface VariableContainerpublic Iterable<String> propertyNames()
DataObjectInstanceVariableContainerpropertyNames in interface DataObjectInstanceVariableContainerpublic com.fasterxml.jackson.databind.node.ObjectNode getData()
getData in interface DataObjectInstanceVariableContainer