public abstract static class DomainObjectUpdate.Builder<E extends DomainObject<?,?,?>,W extends DomainObjectModification<?,?,?,E,?>,WB extends DomainObjectModification.DomainObjectModificationBuilder<?,?,?,E,?,W,WB>,U extends DomainObjectUpdate<W>,SELF extends DomainObjectUpdate.Builder<E,W,WB,U,SELF>> extends EntityUpdate.Builder<E,W,WB,U,SELF>
globalId, modificationBuilder, originalEntity
Modifier | Constructor and Description |
---|---|
protected |
Builder(GlobalId globalId,
WB modificationBuilder,
E originalEntity,
DomainObjectService<?,?,?,E,?,W,WB,U,SELF> service) |
Modifier and Type | Method and Description |
---|---|
E |
apply(String comment)
Applies the changes in this builder.
|
SELF |
deleteVariable(String name)
Deletes the variable with the given
name from the entity with given globalId . |
SELF |
deleteVariable(VariableName<?,?> name)
Deletes the variable with the given
name from the entity with given globalId . |
SELF |
deleteVariables(Collection<String> variableNames)
Deletes the variables from the collection of variable
names from the entity with given globalId . |
SELF |
description(String description)
Sets the description.
|
protected <V> V |
getCurrentValue(ModificationValue<V> optionalModifiedValue,
V baseValue) |
String |
getDescription()
Gets the current description.
|
protected WB |
getModificationBuilderForRead() |
String |
getName()
Gets the current name.
|
State |
getState()
Gets the current state.
|
State |
getSubState()
Gets the current sub-state.
|
Object |
getVariableValue(String name)
Gets the current variable value.
|
<V> V |
getVariableValue(VariableName<V,?> name)
Gets the current variable value.
|
SELF |
name(String name)
Sets the name.
|
SELF |
putVariable(String name,
Object value)
Sets a new variable value.
|
<V> SELF |
putVariable(VariableName<V,?> name,
V value)
Sets a new variable value.
|
SELF |
putVariables(Map<String,Object> variables)
Sets new variable values.
|
SELF |
putVariables(VariableMap variables)
Sets new variable values.
|
SELF |
state(State state)
Sets the state.
|
SELF |
subState(State state)
Sets the sub-state.
|
build, getThis, reset
public SELF name(String name)
name
- the new namepublic String getName()
public SELF description(String description)
description
- the new descriptionpublic String getDescription()
public SELF state(State state)
state
- the new statepublic State getState()
public SELF subState(State state)
state
- the new sub-statepublic State getSubState()
public <V> SELF putVariable(VariableName<V,?> name, V value)
V
- the variable value typename
- the new variable namevalue
- the new variable valuepublic <V> V getVariableValue(VariableName<V,?> name)
V
- the variable value typename
- the variable namepublic SELF putVariable(String name, Object value)
name
- the new variable namevalue
- the new variable valuepublic Object getVariableValue(String name)
name
- the variable namepublic SELF putVariables(Map<String,Object> variables)
variables
- a map containing the new variable valuespublic SELF putVariables(VariableMap variables)
variables
- the new variable valuespublic SELF deleteVariable(String name)
name
from the entity with given globalId
.
In the case when variable does not exist no action is taken.name
- the variable namepublic SELF deleteVariable(VariableName<?,?> name)
name
from the entity with given globalId
.
In the case when variable does not exist no action is taken.name
- the variable namepublic SELF deleteVariables(Collection<String> variableNames)
names
from the entity with given globalId
.
In the case when variable does not exist no action is taken.variableNames
- the collection of variable names to deletepublic E apply(String comment)
comment
- the change commentprotected final <V> V getCurrentValue(ModificationValue<V> optionalModifiedValue, V baseValue)
protected WB getModificationBuilderForRead()
Copyright © 2010 - 2018 edorasware ag. All Rights Reserved.