Record Class NuggetAdminQuery

java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetAdminQuery
Record Components:
offset - zero-based result offset
limit - maximum number of returned records
filters - allowlisted filter clauses in schema-visible order
sorts - allowlisted sort clauses in schema-visible order with a final stable identity tie-breaker

public record NuggetAdminQuery(long offset, int limit, List<NuggetAdminQuery.Filter> filters, List<NuggetAdminQuery.Sort> sorts) extends Record
Common bounded query model for public nugget administration collections.

The query uses enum fields rather than caller-provided object-property names. Filters are exact-match public predicates. Sorts are public ordering fields and always end with NuggetAdminField.STABLE_ID as a deterministic final tie-breaker. Offset and limit are validated with overflow-safe arithmetic. Instances are immutable and thread-safe.

  • Constructor Details

  • Method Details

    • all

      public static NuggetAdminQuery all()
      Returns the default query.
      Returns:
      default query
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • offset

      public long offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • limit

      public int limit()
      Returns the value of the limit record component.
      Returns:
      the value of the limit record component
    • filters

      public List<NuggetAdminQuery.Filter> filters()
      Returns the value of the filters record component.
      Returns:
      the value of the filters record component
    • sorts

      public List<NuggetAdminQuery.Sort> sorts()
      Returns the value of the sorts record component.
      Returns:
      the value of the sorts record component