Interface StateUpdate
- All Superinterfaces:
ResourceUpdate<StateUpdate,StateUpdateAction, StateUpdateBuilder>
public interface StateUpdate
extends ResourceUpdate<StateUpdate,StateUpdateAction,StateUpdateBuilder>
StateUpdate
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
StateUpdate stateUpdate = StateUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic StateUpdateBuilderbuilder()builder factory method for StateUpdatestatic StateUpdateBuilderbuilder(StateUpdate template) create builder for StateUpdate instancecopyDeep()static StateUpdatedeepCopy(StateUpdate template) factory method to create a deep copy of StateUpdate@NotNull @Valid List<StateUpdateAction>Update actions to be performed on the State.@NotNull LongExpected version of the State on which the changes should be applied.static StateUpdateof()factory methodstatic StateUpdateof(StateUpdate template) factory method to create a shallow copy StateUpdatevoidsetActions(StateUpdateAction... actions) Update actions to be performed on the State.voidsetActions(List<StateUpdateAction> actions) Update actions to be performed on the State.voidsetVersion(Long version) Expected version of the State on which the changes should be applied.static com.fasterxml.jackson.core.type.TypeReference<StateUpdate>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithStateUpdate(Function<StateUpdate, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdate
get
-
Method Details
-
getVersion
Expected version of the State on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.
- Specified by:
getVersionin interfaceResourceUpdate<StateUpdate,StateUpdateAction, StateUpdateBuilder> - Returns:
- version
-
getActions
Update actions to be performed on the State.
- Specified by:
getActionsin interfaceResourceUpdate<StateUpdate,StateUpdateAction, StateUpdateBuilder> - Returns:
- actions
-
setVersion
Expected version of the State on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.
- Specified by:
setVersionin interfaceResourceUpdate<StateUpdate,StateUpdateAction, StateUpdateBuilder> - Parameters:
version- value to be set
-
setActions
Update actions to be performed on the State.
- Parameters:
actions- values to be set
-
setActions
Update actions to be performed on the State.
- Specified by:
setActionsin interfaceResourceUpdate<StateUpdate,StateUpdateAction, StateUpdateBuilder> - Parameters:
actions- values to be set
-
of
factory method- Returns:
- instance of StateUpdate
-
of
factory method to create a shallow copy StateUpdate- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
StateUpdate copyDeep() -
deepCopy
factory method to create a deep copy of StateUpdate- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StateUpdate- Returns:
- builder
-
builder
create builder for StateUpdate instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withStateUpdate
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-