Record Class PayloadMapping

java.lang.Object
java.lang.Record
io.axoniq.framework.workflow.dsl.api.PayloadMapping
Record Components:
parameterPayloadReducer - reducer for step input payload.
resultPayloadReducer - reducer for step result payload.

public record PayloadMapping(PayloadReducer parameterPayloadReducer, PayloadReducer resultPayloadReducer) extends Record
Reusable payload mapping shared by primitive specs.
Since:
5.4.0
Author:
Simon Zambrovski
  • Constructor Details

  • Method Details

    • parameterPayloadReducer

      public PayloadMapping parameterPayloadReducer(PayloadReducer parameterPayloadReducer)
      Returns a copy of this mapping with the provided parameter payload reducer.
      Parameters:
      parameterPayloadReducer - reducer used to prepare the step input payload
      Returns:
      copied payload mapping with updated parameter reducer
    • resultPayloadReducer

      public PayloadMapping resultPayloadReducer(PayloadReducer resultPayloadReducer)
      Returns a copy of this mapping with the provided result payload reducer.
      Parameters:
      resultPayloadReducer - reducer used to update the workflow payload from the step result
      Returns:
      copied payload mapping with updated result reducer
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • parameterPayloadReducer

      public PayloadReducer parameterPayloadReducer()
      Returns the value of the parameterPayloadReducer record component.
      Returns:
      the value of the parameterPayloadReducer record component
    • resultPayloadReducer

      public PayloadReducer resultPayloadReducer()
      Returns the value of the resultPayloadReducer record component.
      Returns:
      the value of the resultPayloadReducer record component