Module bus.pager

Class RowBounds

java.lang.Object
org.apache.ibatis.session.RowBounds
org.miaixz.bus.pager.RowBounds

public class RowBounds extends org.apache.ibatis.session.RowBounds
Extends MyBatis's RowBounds to add pagination result information, such as total records and whether to perform a count query.
Since:
Java 17+
Author:
Kimi Liu
  • Field Summary

    Fields inherited from class org.apache.ibatis.session.RowBounds

    DEFAULT, NO_ROW_LIMIT, NO_ROW_OFFSET
  • Constructor Summary

    Constructors
    Constructor
    Description
    RowBounds(int offset, int limit)
    Constructs a RowBounds object with a specified offset and limit.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves whether a count query should be executed.
    Retrieves the total number of records.
    void
    Sets whether a count query should be executed.
    void
    setTotal(Long total)
    Sets the total number of records.

    Methods inherited from class org.apache.ibatis.session.RowBounds

    getLimit, getOffset

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RowBounds

      public RowBounds(int offset, int limit)
      Constructs a RowBounds object with a specified offset and limit.
      Parameters:
      offset - the starting offset
      limit - the number of records per page
  • Method Details

    • getTotal

      public Long getTotal()
      Retrieves the total number of records.
      Returns:
      the total number of records
    • setTotal

      public void setTotal(Long total)
      Sets the total number of records.
      Parameters:
      total - the total number of records to set
    • getCount

      public Boolean getCount()
      Retrieves whether a count query should be executed.
      Returns:
      true if a count query should be executed, false otherwise
    • setCount

      public void setCount(Boolean count)
      Sets whether a count query should be executed.
      Parameters:
      count - true to execute a count query, false otherwise