Class ReviewStateTransitionMessagePayloadBuilder
- All Implemented Interfaces:
Builder<ReviewStateTransitionMessagePayload>
Example to create an instance using the builder pattern
ReviewStateTransitionMessagePayload reviewStateTransitionMessagePayload = ReviewStateTransitionMessagePayload.builder()
.newState(newStateBuilder -> newStateBuilder)
.oldIncludedInStatistics(true)
.newIncludedInStatistics(true)
.force(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ReviewStateTransitionMessagePayload with checking for non-null required valuesbuilds ReviewStateTransitionMessagePayload without checking for non-null required valuesWhether State transition validations were turned off during the Transition State update action.getForce()
Whether State transition validations were turned off during the Transition State update action.Whether the new Review was taken into account in the rating statistics of the target after the state transition.State of the Review after the Transition State update action.Whether the old Review was taken into account in the rating statistics of the target before the state transition.State of the Review before the Transition State update action.Reference to the resource that the Review belongs to.newIncludedInStatistics
(Boolean newIncludedInStatistics) Whether the new Review was taken into account in the rating statistics of the target after the state transition.newState
(StateReference newState) State of the Review after the Transition State update action.State of the Review after the Transition State update action.of()
factory method for an instance of ReviewStateTransitionMessagePayloadBuilderof
(ReviewStateTransitionMessagePayload template) create builder for ReviewStateTransitionMessagePayload instanceoldIncludedInStatistics
(Boolean oldIncludedInStatistics) Whether the old Review was taken into account in the rating statistics of the target before the state transition.oldState
(StateReference oldState) State of the Review before the Transition State update action.State of the Review before the Transition State update action.Reference to the resource that the Review belongs to.target
(Function<ReferenceBuilder, Builder<? extends Reference>> builder) Reference to the resource that the Review belongs to.State of the Review after the Transition State update action.State of the Review before the Transition State update action.
-
Constructor Details
-
ReviewStateTransitionMessagePayloadBuilder
public ReviewStateTransitionMessagePayloadBuilder()
-
-
Method Details
-
oldState
public ReviewStateTransitionMessagePayloadBuilder oldState(Function<StateReferenceBuilder, StateReferenceBuilder> builder) State of the Review before the Transition State update action.
- Parameters:
builder
- function to build the oldState value- Returns:
- Builder
-
withOldState
public ReviewStateTransitionMessagePayloadBuilder withOldState(Function<StateReferenceBuilder, StateReference> builder) State of the Review before the Transition State update action.
- Parameters:
builder
- function to build the oldState value- Returns:
- Builder
-
oldState
State of the Review before the Transition State update action.
- Parameters:
oldState
- value to be set- Returns:
- Builder
-
newState
public ReviewStateTransitionMessagePayloadBuilder newState(Function<StateReferenceBuilder, StateReferenceBuilder> builder) State of the Review after the Transition State update action.
- Parameters:
builder
- function to build the newState value- Returns:
- Builder
-
withNewState
public ReviewStateTransitionMessagePayloadBuilder withNewState(Function<StateReferenceBuilder, StateReference> builder) State of the Review after the Transition State update action.
- Parameters:
builder
- function to build the newState value- Returns:
- Builder
-
newState
State of the Review after the Transition State update action.
- Parameters:
newState
- value to be set- Returns:
- Builder
-
oldIncludedInStatistics
public ReviewStateTransitionMessagePayloadBuilder oldIncludedInStatistics(Boolean oldIncludedInStatistics) Whether the old Review was taken into account in the rating statistics of the target before the state transition.
- Parameters:
oldIncludedInStatistics
- value to be set- Returns:
- Builder
-
newIncludedInStatistics
public ReviewStateTransitionMessagePayloadBuilder newIncludedInStatistics(Boolean newIncludedInStatistics) Whether the new Review was taken into account in the rating statistics of the target after the state transition.
- Parameters:
newIncludedInStatistics
- value to be set- Returns:
- Builder
-
target
Reference to the resource that the Review belongs to.
- Parameters:
target
- value to be set- Returns:
- Builder
-
target
public ReviewStateTransitionMessagePayloadBuilder target(Function<ReferenceBuilder, Builder<? extends Reference>> builder) Reference to the resource that the Review belongs to.
- Parameters:
builder
- function to build the target value- Returns:
- Builder
-
force
Whether State transition validations were turned off during the Transition State update action.
- Parameters:
force
- value to be set- Returns:
- Builder
-
getOldState
State of the Review before the Transition State update action.
- Returns:
- oldState
-
getNewState
State of the Review after the Transition State update action.
- Returns:
- newState
-
getOldIncludedInStatistics
Whether the old Review was taken into account in the rating statistics of the target before the state transition.
- Returns:
- oldIncludedInStatistics
-
getNewIncludedInStatistics
Whether the new Review was taken into account in the rating statistics of the target after the state transition.
- Returns:
- newIncludedInStatistics
-
getTarget
Reference to the resource that the Review belongs to.
- Returns:
- target
-
getForce
Whether State transition validations were turned off during the Transition State update action.
- Returns:
- force
-
build
builds ReviewStateTransitionMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<ReviewStateTransitionMessagePayload>
- Returns:
- ReviewStateTransitionMessagePayload
-
buildUnchecked
builds ReviewStateTransitionMessagePayload without checking for non-null required values- Returns:
- ReviewStateTransitionMessagePayload
-
of
factory method for an instance of ReviewStateTransitionMessagePayloadBuilder- Returns:
- builder
-
of
public static ReviewStateTransitionMessagePayloadBuilder of(ReviewStateTransitionMessagePayload template) create builder for ReviewStateTransitionMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-