java.lang.Object
org.litebridge.orm.api.select.model.LimitSpec
Specification for limiting and offsetting the results of a database query.
This class contains optional properties for specifying a limit and an offset to control the number of records returned and the starting point for the result set. The limit specifies the maximum number of records to return, while the offset specifies the number of records to skip before starting to return results.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LimitSpec
public LimitSpec()
-
-
Method Details
-
getLimit
Returns the limit as anOptional.- Returns:
- an optional containing the limit.
-
setLimit
Sets the limit for the query results.- Parameters:
limit- the limit to set.
-
getOffset
Returns the offset as anOptional.- Returns:
- an optional containing the offset.
-
setOffset
Sets the offset for the query results.- Parameters:
offset- the offset to set.
-
toLimit
Converts this specification to a database SPILimitobject.- Returns:
- an optional containing the SPI limit object.
-