Record Class AuditPage

java.lang.Object
java.lang.Record
fr.becpg.repo.audit.model.AuditPage
Record Components:
entries - the entries of the page, in the database order
nextStartAfterId - the entry identifier the next page starts after, null when the scan reached the end of the audit application
scanInterrupted - true when the scan spent its window budget before filling the page

public record AuditPage(List<org.json.JSONObject> entries, Long nextStartAfterId, boolean scanInterrupted) extends Record

AuditPage class.

One page of audit entries read by keyset paging, along with what a caller needs to carry the scan on where this page stopped.
Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • entries

      private final List<org.json.JSONObject> entries
      The field for the entries record component.
    • nextStartAfterId

      private final Long nextStartAfterId
      The field for the nextStartAfterId record component.
    • scanInterrupted

      private final boolean scanInterrupted
      The field for the scanInterrupted record component.
  • Constructor Details

    • AuditPage

      public AuditPage(List<org.json.JSONObject> entries, Long nextStartAfterId, boolean scanInterrupted)
      Creates an instance of a AuditPage record class.
      Parameters:
      entries - the value for the entries record component
      nextStartAfterId - the value for the nextStartAfterId record component
      scanInterrupted - the value for the scanInterrupted record component
  • Method Details

    • empty

      public static AuditPage empty()

      empty.

      Returns:
      a AuditPage object
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • entries

      public List<org.json.JSONObject> entries()
      Returns the value of the entries record component.
      Returns:
      the value of the entries record component
    • nextStartAfterId

      public Long nextStartAfterId()
      Returns the value of the nextStartAfterId record component.
      Returns:
      the value of the nextStartAfterId record component
    • scanInterrupted

      public boolean scanInterrupted()
      Returns the value of the scanInterrupted record component.
      Returns:
      the value of the scanInterrupted record component