Package org.hibernate.dialect.pagination
Class LimitHelper
- java.lang.Object
-
- org.hibernate.dialect.pagination.LimitHelper
-
public class LimitHelper extends Object
A helper for dealing with LimitHandler implementations
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getFirstRow(RowSelection selection)
Retrieve the indicated first row for paginationstatic boolean
hasFirstRow(RowSelection selection)
Is a first row limit indicated?static boolean
hasMaxRows(RowSelection selection)
Is a max row limit indicated?static boolean
useLimit(LimitHandler limitHandler, RowSelection selection)
Should limit be applied?
-
-
-
Method Detail
-
hasMaxRows
public static boolean hasMaxRows(RowSelection selection)
Is a max row limit indicated?- Parameters:
selection
- The row selection options- Returns:
- Whether a max row limit was indicated
-
useLimit
public static boolean useLimit(LimitHandler limitHandler, RowSelection selection)
Should limit be applied?- Parameters:
limitHandler
- The limit handlerselection
- The row selection- Returns:
- Whether limiting is indicated
-
hasFirstRow
public static boolean hasFirstRow(RowSelection selection)
Is a first row limit indicated?- Parameters:
selection
- The row selection options- Returns:
- Whether a first row limit in indicated
-
getFirstRow
public static int getFirstRow(RowSelection selection)
Retrieve the indicated first row for pagination- Parameters:
selection
- The row selection options- Returns:
- The first row
-
-