Interface TypeUpdate
- All Superinterfaces:
ResourceUpdate<TypeUpdate,
TypeUpdateAction, TypeUpdateBuilder>
TypeUpdate
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TypeUpdate typeUpdate = TypeUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic TypeUpdateBuilder
builder()
builder factory method for TypeUpdatestatic TypeUpdateBuilder
builder
(TypeUpdate template) create builder for TypeUpdate instancestatic TypeUpdate
deepCopy
(TypeUpdate template) factory method to create a deep copy of TypeUpdate@NotNull @Valid List<TypeUpdateAction>
Update actions to be performed on the Type.@NotNull Long
Expected version of the type on which the changes should be applied.static TypeUpdate
of()
factory methodstatic TypeUpdate
of
(TypeUpdate template) factory method to create a shallow copy TypeUpdatevoid
setActions
(TypeUpdateAction... actions) Update actions to be performed on the Type.void
setActions
(List<TypeUpdateAction> actions) Update actions to be performed on the Type.void
setVersion
(Long version) Expected version of the type on which the changes should be applied.static com.fasterxml.jackson.core.type.TypeReference<TypeUpdate>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withTypeUpdate
(Function<TypeUpdate, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdate
get
-
Method Details
-
getVersion
Expected version of the type 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<TypeUpdate,
TypeUpdateAction, TypeUpdateBuilder> - Returns:
- version
-
getActions
Update actions to be performed on the Type.
- Specified by:
getActions
in interfaceResourceUpdate<TypeUpdate,
TypeUpdateAction, TypeUpdateBuilder> - Returns:
- actions
-
setVersion
Expected version of the type 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<TypeUpdate,
TypeUpdateAction, TypeUpdateBuilder> - Parameters:
version
- value to be set
-
setActions
Update actions to be performed on the Type.
- Parameters:
actions
- values to be set
-
setActions
Update actions to be performed on the Type.
- Specified by:
setActions
in interfaceResourceUpdate<TypeUpdate,
TypeUpdateAction, TypeUpdateBuilder> - Parameters:
actions
- values to be set
-
of
factory method- Returns:
- instance of TypeUpdate
-
of
factory method to create a shallow copy TypeUpdate- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of TypeUpdate- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TypeUpdate- Returns:
- builder
-
builder
create builder for TypeUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withTypeUpdate
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
-