Class TransitionLineItemStateChangeBuilder
java.lang.Object
com.commercetools.history.models.change.TransitionLineItemStateChangeBuilder
- All Implemented Interfaces:
Builder<TransitionLineItemStateChange>
public class TransitionLineItemStateChangeBuilder
extends Object
implements Builder<TransitionLineItemStateChange>
TransitionLineItemStateChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TransitionLineItemStateChange transitionLineItemStateChange = TransitionLineItemStateChange.builder()
.change("{change}")
.plusPreviousValue(previousValueBuilder -> previousValueBuilder)
.plusNextValue(nextValueBuilder -> nextValueBuilder)
.lineItemId("{lineItemId}")
.stateId("{stateId}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddNextValue
(Function<ItemStateBuilder, ItemState> builder) Value after the change.addPreviousValue
(Function<ItemStateBuilder, ItemState> builder) Value before the change.build()
builds TransitionLineItemStateChange with checking for non-null required valuesbuilds TransitionLineItemStateChange without checking for non-null required valuesset the value to the changevalue of change}id
of the updated LineItem.Value after the change.Value before the change.id
of the State involved in the transition.lineItemId
(String lineItemId) id
of the updated LineItem.Value after the change.Value after the change.of()
factory method for an instance of TransitionLineItemStateChangeBuilderof
(TransitionLineItemStateChange template) create builder for TransitionLineItemStateChange instanceplusNextValue
(ItemState... nextValue) Value after the change.Value after the change.plusPreviousValue
(ItemState... previousValue) Value before the change.Value before the change.previousValue
(ItemState... previousValue) Value before the change.previousValue
(List<ItemState> previousValue) Value before the change.setNextValue
(Function<ItemStateBuilder, ItemState> builder) Value after the change.setPreviousValue
(Function<ItemStateBuilder, ItemState> builder) Value before the change.id
of the State involved in the transition.Value after the change.Value before the change.
-
Constructor Details
-
TransitionLineItemStateChangeBuilder
public TransitionLineItemStateChangeBuilder()
-
-
Method Details
-
change
set the value to the change- Parameters:
change
- value to be set- Returns:
- Builder
-
previousValue
Value before the change.
- Parameters:
previousValue
- value to be set- Returns:
- Builder
-
previousValue
Value before the change.
- Parameters:
previousValue
- value to be set- Returns:
- Builder
-
plusPreviousValue
Value before the change.
- Parameters:
previousValue
- value to be set- Returns:
- Builder
-
plusPreviousValue
public TransitionLineItemStateChangeBuilder plusPreviousValue(Function<ItemStateBuilder, ItemStateBuilder> builder) Value before the change.
- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
withPreviousValue
public TransitionLineItemStateChangeBuilder withPreviousValue(Function<ItemStateBuilder, ItemStateBuilder> builder) Value before the change.
- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
addPreviousValue
public TransitionLineItemStateChangeBuilder addPreviousValue(Function<ItemStateBuilder, ItemState> builder) Value before the change.
- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
setPreviousValue
public TransitionLineItemStateChangeBuilder setPreviousValue(Function<ItemStateBuilder, ItemState> builder) Value before the change.
- Parameters:
builder
- function to build the previousValue value- Returns:
- Builder
-
nextValue
Value after the change.
- Parameters:
nextValue
- value to be set- Returns:
- Builder
-
nextValue
Value after the change.
- Parameters:
nextValue
- value to be set- Returns:
- Builder
-
plusNextValue
Value after the change.
- Parameters:
nextValue
- value to be set- Returns:
- Builder
-
plusNextValue
public TransitionLineItemStateChangeBuilder plusNextValue(Function<ItemStateBuilder, ItemStateBuilder> builder) Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
withNextValue
public TransitionLineItemStateChangeBuilder withNextValue(Function<ItemStateBuilder, ItemStateBuilder> builder) Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
addNextValue
public TransitionLineItemStateChangeBuilder addNextValue(Function<ItemStateBuilder, ItemState> builder) Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
setNextValue
public TransitionLineItemStateChangeBuilder setNextValue(Function<ItemStateBuilder, ItemState> builder) Value after the change.
- Parameters:
builder
- function to build the nextValue value- Returns:
- Builder
-
lineItemId
id
of the updated LineItem.- Parameters:
lineItemId
- value to be set- Returns:
- Builder
-
stateId
id
of the State involved in the transition.- Parameters:
stateId
- value to be set- Returns:
- Builder
-
getChange
value of change}- Returns:
- change
-
getPreviousValue
Value before the change.
- Returns:
- previousValue
-
getNextValue
Value after the change.
- Returns:
- nextValue
-
getLineItemId
id
of the updated LineItem.- Returns:
- lineItemId
-
getStateId
id
of the State involved in the transition.- Returns:
- stateId
-
build
builds TransitionLineItemStateChange with checking for non-null required values- Specified by:
build
in interfaceBuilder<TransitionLineItemStateChange>
- Returns:
- TransitionLineItemStateChange
-
buildUnchecked
builds TransitionLineItemStateChange without checking for non-null required values- Returns:
- TransitionLineItemStateChange
-
of
factory method for an instance of TransitionLineItemStateChangeBuilder- Returns:
- builder
-
of
create builder for TransitionLineItemStateChange instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-