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