Interface DataObjectModificationBuilder
-
- All Known Implementing Classes:
DataObjectModificationBuilderImpl
public interface DataObjectModificationBuilderThe basic data object modification builder which might be extended with a strongly typed support by the underlyingDataObjectDataSourceimplementation.- Author:
- Micha Kiener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetDefinitionId()Returns the id of the data object definition this modification builder is based on.java.util.Map<java.lang.String,java.lang.Object>getModificationData()java.util.Map<java.lang.String,java.lang.Object>getOriginalData()DataObjectInstanceVariableContainermodify()Persists the modified data object instance.DataObjectModificationBuildermodifyFromPayload(DataObjectHandlingContext context)If a modification builder is used to modify a data object given by the payload sent from a form typically, this method is invoked to modify the data object according the given payload data.DataObjectModificationBuilderoriginalValue(java.lang.String valueName, java.lang.Object value)Generic setter for a data object field value specified by its name and value to be set.DataObjectModificationBuildervalue(java.lang.String valueName, java.lang.Object value)Generic setter for a data object field value specified by its name and value to be set.
-
-
-
Method Detail
-
getDefinitionId
java.lang.String getDefinitionId()
Returns the id of the data object definition this modification builder is based on.- Returns:
- the id of the data object definition
-
modifyFromPayload
DataObjectModificationBuilder modifyFromPayload(DataObjectHandlingContext context)
If a modification builder is used to modify a data object given by the payload sent from a form typically, this method is invoked to modify the data object according the given payload data.- Parameters:
context- the data object context containing the data and full payload and further information for parsing the content into the data object- Returns:
- the builder instance for method chaining
-
value
DataObjectModificationBuilder value(java.lang.String valueName, java.lang.Object value)
Generic setter for a data object field value specified by its name and value to be set.- Parameters:
valueName- the name of the data object field to set a valuevalue- the value to be set- Returns:
- the builder instance for method chaining
-
originalValue
DataObjectModificationBuilder originalValue(java.lang.String valueName, java.lang.Object value)
Generic setter for a data object field value specified by its name and value to be set.- Parameters:
valueName- the name of the data object field to set a valuevalue- the value to be set- Returns:
- the builder instance for method chaining
-
modify
DataObjectInstanceVariableContainer modify()
Persists the modified data object instance.- Returns:
- the modified data object instance which might be the very same or actually a new one returned by the data source
-
getModificationData
java.util.Map<java.lang.String,java.lang.Object> getModificationData()
-
getOriginalData
java.util.Map<java.lang.String,java.lang.Object> getOriginalData()
-
-