Interface ReviewStateTransitionMessage

All Superinterfaces:
BaseResource, DomainResource<Message>, Identifiable<Message>, Message, Versioned<Message>

public interface ReviewStateTransitionMessage extends Message

Generated after a successful Transition State update action.


Example to create an instance using the builder pattern

     ReviewStateTransitionMessage reviewStateTransitionMessage = ReviewStateTransitionMessage.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .sequenceNumber(0.3)
             .resource(resourceBuilder -> resourceBuilder)
             .resourceVersion(0.3)
             .newState(newStateBuilder -> newStateBuilder)
             .oldIncludedInStatistics(true)
             .newIncludedInStatistics(true)
             .force(true)
             .build()
 
  • Field Details

    • REVIEW_STATE_TRANSITION

      static final String REVIEW_STATE_TRANSITION
      discriminator value for ReviewStateTransitionMessage
      See Also:
  • Method Details

    • getOldState

      @Valid @Valid StateReference getOldState()

      State of the Review before the Transition State update action.

      Returns:
      oldState
    • getNewState

      @NotNull @Valid @NotNull @Valid StateReference getNewState()

      State of the Review after the Transition State update action.

      Returns:
      newState
    • getOldIncludedInStatistics

      @NotNull @NotNull Boolean getOldIncludedInStatistics()

      Whether the old Review was taken into account in the rating statistics of the target before the state transition.

      Returns:
      oldIncludedInStatistics
    • getNewIncludedInStatistics

      @NotNull @NotNull Boolean getNewIncludedInStatistics()

      Whether the new Review was taken into account in the rating statistics of the target after the state transition.

      Returns:
      newIncludedInStatistics
    • getTarget

      @Valid @Valid Reference getTarget()

      Reference to the resource that the Review belongs to.

      Returns:
      target
    • getForce

      @NotNull @NotNull Boolean getForce()

      Whether State transition validations were turned off during the Transition State update action.

      Returns:
      force
    • setOldState

      void setOldState(StateReference oldState)

      State of the Review before the Transition State update action.

      Parameters:
      oldState - value to be set
    • setNewState

      void setNewState(StateReference newState)

      State of the Review after the Transition State update action.

      Parameters:
      newState - value to be set
    • setOldIncludedInStatistics

      void setOldIncludedInStatistics(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
    • setNewIncludedInStatistics

      void setNewIncludedInStatistics(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
    • setTarget

      void setTarget(Reference target)

      Reference to the resource that the Review belongs to.

      Parameters:
      target - value to be set
    • setForce

      void setForce(Boolean force)

      Whether State transition validations were turned off during the Transition State update action.

      Parameters:
      force - value to be set
    • of

      factory method
      Returns:
      instance of ReviewStateTransitionMessage
    • of

      factory method to create a shallow copy ReviewStateTransitionMessage
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ReviewStateTransitionMessage
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ReviewStateTransitionMessage
      Returns:
      builder
    • builder

      create builder for ReviewStateTransitionMessage instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withReviewStateTransitionMessage

      default <T> T withReviewStateTransitionMessage(Function<ReviewStateTransitionMessage,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ReviewStateTransitionMessage> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference