T
- The type of the id/externalIdD
- The type of the definitionIdP
- The type of the providerIdpublic abstract class DomainObject<T extends EntityId,D extends EntityId,P extends Id> extends Entity<T,P>
Modifier and Type | Class and Description |
---|---|
static class |
DomainObject.DomainObjectBuilder<T extends EntityId,D extends EntityId,P extends Id,E extends DomainObject<T,D,P>,SELF extends DomainObject.DomainObjectBuilder<T,D,P,E,SELF>> |
protected static class |
DomainObject.DomainObjectData<T extends EntityId,D extends EntityId,P extends Id>
Data container that holds the state of a domain object.
|
Modifier and Type | Field and Description |
---|---|
protected DomainObject.DomainObjectData<T,D,P> |
domainObjectData |
static com.google.common.base.Optional<Object> |
VARIABLE_DELETED_VALUE
Variable value used inside the
DomainObjectModification as a flag to delete the variables in the next update. |
entityData
Modifier | Constructor and Description |
---|---|
protected |
DomainObject(Entity.EntityData<T,P> entityData,
DomainObject.DomainObjectData<T,D,P> domainObjectData) |
protected |
DomainObject(Entity.EntityData<T,P> entityData,
DomainObject.DomainObjectData<T,D,P> domainObjectData,
List<? extends EntityId> variablesPath) |
Modifier and Type | Method and Description |
---|---|
D |
getDefinitionId()
Returns the definition id of the entity.
|
Variable |
getLocalVariable(String name)
Returns the local variable with the given name.
|
List<Variable> |
getLocalVariables()
Returns the local variables of the entity.
|
List<Variable> |
getLocalVariables(com.google.common.base.Predicate<Variable> predicate)
Returns the local variables of the entity, filtered by the given predicate.
|
Map<String,Object> |
getLocalVariablesMap()
Returns the local variables of the entity as name/value pairs.
|
Map<String,Object> |
getLocalVariablesMap(com.google.common.base.Predicate<Variable> predicate)
Returns the local variables of the entity as name/value pairs, filtered by the given predicate.
|
<V,W> V |
getLocalVariableValue(NamedValueAccessor<V,W> variableAccessor)
Returns the value of the local variable with the name defined by the variable accessor, deserialized and cast to the type expected by the variable accessor.
|
Object |
getLocalVariableValue(String name)
Returns the value of the local variable with the given name.
|
<T> T |
getLocalVariableValue(String name,
Class<T> expectedType)
Returns the value of the local variable with the given name, cast to the expected type.
|
<T> T |
getLocalVariableValue(String name,
com.google.common.reflect.TypeToken<T> expectedType)
Returns the value of the local variable with the given name, cast to the expected type.
|
State |
getState()
Returns the current state of the entity.
|
Date |
getStateUpdateTime()
Returns the time the entity state was last updated.
|
State |
getSubState()
Returns the current sub state of the entity.
|
Date |
getSubStateUpdateTime()
Returns the time the entity sub state was last updated.
|
Variable |
getVariable(String name)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariable(String) method instead and recheck where you store the variables |
List<Variable> |
getVariables()
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariables() method instead and recheck where you store the variables |
List<Variable> |
getVariables(com.google.common.base.Predicate<Variable> predicate)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariables(Predicate) method instead and recheck where you store the variables |
Map<String,Object> |
getVariablesMap()
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariablesMap() method instead and recheck where you store the variables |
Map<String,Object> |
getVariablesMap(com.google.common.base.Predicate<Variable> predicate)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariablesMap(Predicate) method instead and recheck where you store the variables |
<V,W> V |
getVariableValue(NamedValueAccessor<V,W> variableAccessor)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariableValue(NamedValueAccessor) method instead and recheck where you store the variables |
Object |
getVariableValue(String name)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariableValue(String) method instead and recheck where you store the variables |
<T> T |
getVariableValue(String name,
Class<T> expectedType)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariableValue(String, Class) method instead and recheck where you store the variables |
<T> T |
getVariableValue(String name,
com.google.common.reflect.TypeToken<T> expectedType)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
getLocalVariableValue(String, Class) method instead and recheck where you store the variables |
boolean |
hasLocalVariable(NamedValueAccessor<?,?> variableAccessor)
Returns true if the entity has a local variable with the name of the given variable accessor.
|
boolean |
hasLocalVariable(String name)
Returns true if the entity has a local variable with the given name.
|
boolean |
hasVariable(NamedValueAccessor<?,?> variableAccessor)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
hasLocalVariable(NamedValueAccessor) method instead and recheck where you store the variables |
boolean |
hasVariable(String name)
Deprecated.
support for non-explicit hierarchy parsing is going to be removed.
Please use the
hasLocalVariable(String) method instead and recheck where you store the variables |
getCreationTime, getDescription, getExternalId, getGlobalId, getId, getModificationCreatorId, getModificationUpdaterId, getModificationVersion, getName, getProviderId, getTenantId, getType, getUpdateTime, toString
public static final com.google.common.base.Optional<Object> VARIABLE_DELETED_VALUE
DomainObjectModification
as a flag to delete the variables in the next update.protected DomainObject(Entity.EntityData<T,P> entityData, DomainObject.DomainObjectData<T,D,P> domainObjectData)
protected DomainObject(Entity.EntityData<T,P> entityData, DomainObject.DomainObjectData<T,D,P> domainObjectData, List<? extends EntityId> variablesPath)
public D getDefinitionId()
public State getState()
public State getSubState()
@Deprecated public final List<Variable> getVariables()
getLocalVariables()
method instead and recheck where you store the variables@Deprecated public final List<Variable> getVariables(com.google.common.base.Predicate<Variable> predicate)
getLocalVariables(Predicate)
method instead and recheck where you store the variablespredicate
- the predicate to filter by@Deprecated public final Map<String,Object> getVariablesMap()
getLocalVariablesMap()
method instead and recheck where you store the variables@Deprecated public final Map<String,Object> getVariablesMap(com.google.common.base.Predicate<Variable> predicate)
getLocalVariablesMap(Predicate)
method instead and recheck where you store the variablespredicate
- the predicate to filter by@Deprecated public Variable getVariable(String name)
getLocalVariable(String)
method instead and recheck where you store the variablesname
- the name of the variable to return@Deprecated public final Object getVariableValue(String name)
getLocalVariableValue(String)
method instead and recheck where you store the variablesname
- the name of the variable whose value to return@Deprecated public final <T> T getVariableValue(String name, Class<T> expectedType)
getLocalVariableValue(String, Class)
method instead and recheck where you store the variablesT
- the type of the id/externalIdname
- the name of the variable whose value to returnexpectedType
- the expected type of the variable value@Deprecated public final <T> T getVariableValue(String name, com.google.common.reflect.TypeToken<T> expectedType)
getLocalVariableValue(String, Class)
method instead and recheck where you store the variables
Note: using this TypeToken
based API is useful when working with parameterized values.
T
- the type of the id/externalIdname
- the name of the variable whose value to returnexpectedType
- the expected type of the variable value@Deprecated public final <V,W> V getVariableValue(NamedValueAccessor<V,W> variableAccessor)
getLocalVariableValue(NamedValueAccessor)
method instead and recheck where you store the variablesV
- the expected transient type of the named valueW
- the expected persisted type of the named valuevariableAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected type@Deprecated public boolean hasVariable(String name)
hasLocalVariable(String)
method instead and recheck where you store the variablesname
- the name of the variable@Deprecated public boolean hasVariable(NamedValueAccessor<?,?> variableAccessor)
hasLocalVariable(NamedValueAccessor)
method instead and recheck where you store the variablesvariableAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected typepublic final List<Variable> getLocalVariables()
public final List<Variable> getLocalVariables(com.google.common.base.Predicate<Variable> predicate)
predicate
- the predicate to filter bypublic final Map<String,Object> getLocalVariablesMap()
public final Map<String,Object> getLocalVariablesMap(com.google.common.base.Predicate<Variable> predicate)
predicate
- the predicate to filter bypublic Variable getLocalVariable(String name)
name
- the name of the local variable to returnpublic final Object getLocalVariableValue(String name)
name
- the name of the local variable whose value to returnpublic final <T> T getLocalVariableValue(String name, Class<T> expectedType)
T
- the type of the id/externalIdname
- the name of the local variable whose value to returnexpectedType
- the expected type of the variable valuepublic final <T> T getLocalVariableValue(String name, com.google.common.reflect.TypeToken<T> expectedType)
Note: using this TypeToken
based API is useful when working with parameterized values.
T
- the type of the id/externalIdname
- the name of the local variable whose value to returnexpectedType
- the expected type of the variable valuepublic final <V,W> V getLocalVariableValue(NamedValueAccessor<V,W> variableAccessor)
V
- the expected transient type of the named valueW
- the expected persisted type of the named valuevariableAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected typepublic boolean hasLocalVariable(String name)
name
- the name of the variablepublic boolean hasLocalVariable(NamedValueAccessor<?,?> variableAccessor)
variableAccessor
- the accessor from which to derive the name, deserialize the value, and cast to the expected typepublic Date getStateUpdateTime()
public Date getSubStateUpdateTime()
Copyright © 2010 - 2018 edorasware ag. All Rights Reserved.