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
ConstructorsConstructorDescriptionRowBounds(int offset, int limit) Constructs a RowBounds object with a specified offset and limit. -
Method Summary
Methods inherited from class org.apache.ibatis.session.RowBounds
getLimit, getOffset
-
Constructor Details
-
RowBounds
public RowBounds(int offset, int limit) Constructs a RowBounds object with a specified offset and limit.- Parameters:
offset- the starting offsetlimit- the number of records per page
-
-
Method Details
-
getTotal
Retrieves the total number of records.- Returns:
- the total number of records
-
setTotal
Sets the total number of records.- Parameters:
total- the total number of records to set
-
getCount
Retrieves whether a count query should be executed.- Returns:
- true if a count query should be executed, false otherwise
-
setCount
Sets whether a count query should be executed.- Parameters:
count- true to execute a count query, false otherwise
-