Record Class ReconcileResult

java.lang.Object
java.lang.Record
com.kingsrook.qqq.backend.core.jobs.effects.ReconcileResult

public record ReconcileResult(ReconcileResult.Outcome outcome, String providerRef, String message) extends Record
What a target's reconcile lookup (by idempotency key or natural id) found for an effect whose delivery outcome is unknown. - FOUND: it was delivered: the effect becomes SENT. - NOT_FOUND: it definitely was not: the effect becomes PENDING (safe to send). - UNKNOWN: still can't tell: tried again, then queued for review.
  • Constructor Details

    • ReconcileResult

      public ReconcileResult(ReconcileResult.Outcome outcome, String providerRef, String message)
      Creates an instance of a ReconcileResult record class.
      Parameters:
      outcome - the value for the outcome record component
      providerRef - the value for the providerRef record component
      message - the value for the message record component
  • Method Details

    • found

      public static ReconcileResult found(String providerRef)
      It was delivered.
    • notFound

      public static ReconcileResult notFound()
      It definitely was not delivered.
    • unknown

      public static ReconcileResult unknown(String message)
      Can't tell.
    • 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.
    • outcome

      public ReconcileResult.Outcome outcome()
      Returns the value of the outcome record component.
      Returns:
      the value of the outcome record component
    • providerRef

      public String providerRef()
      Returns the value of the providerRef record component.
      Returns:
      the value of the providerRef record component
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component