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 StateUpdateBuilder
builder()
builder factory method for StateUpdatestatic StateUpdateBuilder
builder
(StateUpdate template) create builder for StateUpdate instancestatic StateUpdate
deepCopy
(StateUpdate template) factory method to create a deep copy of StateUpdate@NotNull @Valid List<StateUpdateAction>
Update actions to be performed on the State.@NotNull Long
Expected version of the State on which the changes should be applied.static StateUpdate
of()
factory methodstatic StateUpdate
of
(StateUpdate template) factory method to create a shallow copy StateUpdatevoid
setActions
(StateUpdateAction... actions) Update actions to be performed on the State.void
setActions
(List<StateUpdateAction> actions) Update actions to be performed on the State.void
setVersion
(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> T
withStateUpdate
(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:
getVersion
in interfaceResourceUpdate<StateUpdate,
StateUpdateAction, StateUpdateBuilder> - Returns:
- version
-
getActions
Update actions to be performed on the State.
- Specified by:
getActions
in 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:
setVersion
in 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:
setActions
in 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
-
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
-