Record Class DataSourceController.TablesPage

java.lang.Object
java.lang.Record
io.micronaut.controlpanel.panels.datasource.DataSourceController.TablesPage
Record Components:
page - Current 1-based page number
pageCount - Total page count
summary - Human-readable page summary
range - Human-readable result range
pageSizes - Available page-size options
tables - Rows rendered on this page
empty - Whether the page has no rows
previousDisabled - Whether previous-page navigation is disabled
nextDisabled - Whether next-page navigation is disabled
Enclosing class:
DataSourceController

public static record DataSourceController.TablesPage(int page, int pageCount, String summary, String range, List<DataSourceController.PageSizeOption> pageSizes, List<DataSourceController.TableRow> tables, boolean empty, boolean previousDisabled, boolean nextDisabled) extends Record
View model for one page of datasource tables.
Since:
2.0.0
Author:
Álvaro Sánchez-Mariscal
  • Constructor Details

    • TablesPage

      public TablesPage(int page, int pageCount, String summary, String range, List<DataSourceController.PageSizeOption> pageSizes, List<DataSourceController.TableRow> tables, boolean empty, boolean previousDisabled, boolean nextDisabled)
      Creates an instance of a TablesPage record class.
      Parameters:
      page - the value for the page record component
      pageCount - the value for the pageCount record component
      summary - the value for the summary record component
      range - the value for the range record component
      pageSizes - the value for the pageSizes record component
      tables - the value for the tables record component
      empty - the value for the empty record component
      previousDisabled - the value for the previousDisabled record component
      nextDisabled - the value for the nextDisabled record component
  • Method Details

    • 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.
    • page

      public int page()
      Returns the value of the page record component.
      Returns:
      the value of the page record component
    • pageCount

      public int pageCount()
      Returns the value of the pageCount record component.
      Returns:
      the value of the pageCount record component
    • summary

      public String summary()
      Returns the value of the summary record component.
      Returns:
      the value of the summary record component
    • range

      public String range()
      Returns the value of the range record component.
      Returns:
      the value of the range record component
    • pageSizes

      Returns the value of the pageSizes record component.
      Returns:
      the value of the pageSizes record component
    • tables

      Returns the value of the tables record component.
      Returns:
      the value of the tables record component
    • empty

      public boolean empty()
      Returns the value of the empty record component.
      Returns:
      the value of the empty record component
    • previousDisabled

      public boolean previousDisabled()
      Returns the value of the previousDisabled record component.
      Returns:
      the value of the previousDisabled record component
    • nextDisabled

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