Class ChangeTransactionStateChangeBuilder
java.lang.Object
com.commercetools.history.models.change.ChangeTransactionStateChangeBuilder
- All Implemented Interfaces:
Builder<ChangeTransactionStateChange>
public class ChangeTransactionStateChangeBuilder
extends Object
implements Builder<ChangeTransactionStateChange>
ChangeTransactionStateChangeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ChangeTransactionStateChange changeTransactionStateChange = ChangeTransactionStateChange.builder()
.change("{change}")
.previousValue(TransactionState.INITIAL)
.nextValue(TransactionState.INITIAL)
.transaction(transactionBuilder -> transactionBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds ChangeTransactionStateChange with checking for non-null required valuesbuilds ChangeTransactionStateChange without checking for non-null required valuesset the value to the changevalue of change}Value after the change.Value before the change.Holds information about the updated Transaction.nextValue(TransactionState nextValue) Value after the change.of()factory method for an instance of ChangeTransactionStateChangeBuilderof(ChangeTransactionStateChange template) create builder for ChangeTransactionStateChange instancepreviousValue(TransactionState previousValue) Value before the change.transaction(TransactionChangeValue transaction) Holds information about the updated Transaction.Holds information about the updated Transaction.Holds information about the updated Transaction.
-
Constructor Details
-
ChangeTransactionStateChangeBuilder
public ChangeTransactionStateChangeBuilder()
-
-
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
-
nextValue
Value after the change.
- Parameters:
nextValue- value to be set- Returns:
- Builder
-
transaction
public ChangeTransactionStateChangeBuilder transaction(Function<TransactionChangeValueBuilder, TransactionChangeValueBuilder> builder) Holds information about the updated Transaction.
- Parameters:
builder- function to build the transaction value- Returns:
- Builder
-
withTransaction
public ChangeTransactionStateChangeBuilder withTransaction(Function<TransactionChangeValueBuilder, TransactionChangeValue> builder) Holds information about the updated Transaction.
- Parameters:
builder- function to build the transaction value- Returns:
- Builder
-
transaction
Holds information about the updated Transaction.
- Parameters:
transaction- 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
-
getTransaction
Holds information about the updated Transaction.
- Returns:
- transaction
-
build
builds ChangeTransactionStateChange with checking for non-null required values- Specified by:
buildin interfaceBuilder<ChangeTransactionStateChange>- Returns:
- ChangeTransactionStateChange
-
buildUnchecked
builds ChangeTransactionStateChange without checking for non-null required values- Returns:
- ChangeTransactionStateChange
-
of
factory method for an instance of ChangeTransactionStateChangeBuilder- Returns:
- builder
-
of
create builder for ChangeTransactionStateChange instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-