LimitHandler interface.
| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern | |
| private static final Pattern | |
| public static LimitHandler | |
| private static final Pattern | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final int | Returns: The number of parameter values bound.the limit. limit, PreparedStatement Statement to which to bind limit parameter values. statement, int Index from which to start binding. index)Default implementation of binding parameter values needed by the LIMIT clause. |
| public int | bindLimitParametersAtEndOfQuery(Limit limit, PreparedStatement statement, int index)
Implements org. |
| public int | bindLimitParametersAtStartOfQuery(Limit limit, PreparedStatement statement, int index)
Implements org. |
| public boolean | Returns: true if limit parameters come before other parametersDoes the offset/limit clause come at the start of the
|
| public boolean | Returns: true if the correct order is limit then offsetUsually, the offset comes before the limit, but occasionally the offset is specified after the limit. |
| public int | Returns: The resulting offset, adjusted to one-based if necessary.The user-supplied, zero-based first row offset. zeroBasedFirstResult)The API method |
| public boolean | Returns: true to force limit into SQL query even if none specified in Hibernate query; false otherwise.Generally, if there is no limit applied to a Hibernate query we do not apply any limits to the SQL query. |
| protected final int | Returns: The first rowThe limit limit)Retrieve the indicated first row for pagination |
| protected Pattern | getForUpdatePattern()
The offset/limit clauses typically must come
before the |
| protected final int | Returns: The appropriate value to bind into the limit clause.The limit limit)Some dialect-specific LIMIT clauses require the maximum last row number (aka, first_row_number + total_row_count), while others require the maximum returned row count (the total maximum number of rows to return). |
| public static boolean | Returns: Whether a first row limit was indicatedThe limit limit)Is a first row limit indicated? |
| public static boolean | Returns: Whether a max row limit was indicatedThe limit limit)Is a max row limit indicated? |
| protected static String | insertAfterDistinct(String limitOffsetClause, String sqlStatement)
Insert a fragment of SQL right after
|
| protected static String | insertAfterSelect(String limitOffsetClause, String sqlStatement)
Insert a fragment of SQL right after
|
| protected String | insertAtEnd(String limitOffsetClause, String sqlStatement)
Insert a fragment of SQL right at the very end of the query. |
| protected String | insertBeforeForUpdate(String limitOffsetClause, String sqlStatement)
Insert a fragment of SQL right before the
|
| public String | processSql(String sql, Limit limit)
Implements org. |
| public void | setMaxRows(Limit limit, PreparedStatement statement)
Implements org. |
| public boolean | supportsLimit()
Implements org. |
| public boolean | supportsLimitOffset()
Implements org. |
| public boolean | supportsOffset()
Implements org. |
| public boolean | Returns: true if bind variables can be usedDoes this handler support bind variables (JDBC prepared statement parameters) for its limit/offset? |
| public boolean | Returns: true if the limit clause expects the number of the last row, false if it expects the page sizeDoes the limit clause expect the number of the last row, or the "page size", the maximum number of rows we want to receive? |
| END_PATTERN | back to summary |
|---|---|
| private static final Pattern END_PATTERN | |
| FOR_UPDATE_PATTERN | back to summary |
|---|---|
| private static final Pattern FOR_UPDATE_PATTERN | |
| NO_LIMIT | back to summary |
|---|---|
| public static LimitHandler NO_LIMIT | |
| SELECT_DISTINCT_PATTERN | back to summary |
|---|---|
| private static final Pattern SELECT_DISTINCT_PATTERN | |
| SELECT_PATTERN | back to summary |
|---|---|
| private static final Pattern SELECT_PATTERN | |
| AbstractLimitHandler | back to summary |
|---|---|
| public AbstractLimitHandler() | |
| bindLimitParameters | back to summary |
|---|---|
| protected final int bindLimitParameters(Limit limit, PreparedStatement statement, int index) throws SQLException Default implementation of binding parameter values needed by the LIMIT clause.
| |
| bindLimitParametersAtEndOfQuery | back to summary |
|---|---|
| public int bindLimitParametersAtEndOfQuery(Limit limit, PreparedStatement statement, int index) throws SQLException Implements org.
| |
| bindLimitParametersAtStartOfQuery | back to summary |
|---|---|
| public int bindLimitParametersAtStartOfQuery(Limit limit, PreparedStatement statement, int index) throws SQLException Implements org.
| |
| bindLimitParametersFirst | back to summary |
|---|---|
| public boolean bindLimitParametersFirst() Does the offset/limit clause come at the start of the
| |
| bindLimitParametersInReverseOrder | back to summary |
|---|---|
| public boolean bindLimitParametersInReverseOrder() Usually, the offset comes before the limit, but occasionally the offset is specified after the limit. Does this dialect require us to bind the parameters in reverse order?
| |
| convertToFirstRowValue | back to summary |
|---|---|
| public int convertToFirstRowValue(int zeroBasedFirstResult) The API method Implementation Note The value passed into
| |
| forceLimitUsage | back to summary |
|---|---|
| public boolean forceLimitUsage() Generally, if there is no limit applied to a Hibernate query we do not apply any limits to the SQL query. This option forces that the limit be written to the SQL query.
| |
| getFirstRow | back to summary |
|---|---|
| protected final int getFirstRow(Limit limit) Retrieve the indicated first row for pagination
| |
| getForUpdatePattern | back to summary |
|---|---|
| protected Pattern getForUpdatePattern() The offset/limit clauses typically must come
before the | |
| getMaxOrLimit | back to summary |
|---|---|
| protected final int getMaxOrLimit(Limit limit) Some dialect-specific LIMIT clauses require the maximum last row number (aka, first_row_number + total_row_count), while others require the maximum returned row count (the total maximum number of rows to return).
| |
| hasFirstRow | back to summary |
|---|---|
| public static boolean hasFirstRow(Limit limit) Is a first row limit indicated?
| |
| hasMaxRows | back to summary |
|---|---|
| public static boolean hasMaxRows(Limit limit) Is a max row limit indicated?
| |
| insertAfterDistinct | back to summary |
|---|---|
| protected static String insertAfterDistinct(String limitOffsetClause, String sqlStatement) Insert a fragment of SQL right after
| |
| insertAfterSelect | back to summary |
|---|---|
| protected static String insertAfterSelect(String limitOffsetClause, String sqlStatement) Insert a fragment of SQL right after
| |
| insertAtEnd | back to summary |
|---|---|
| protected String insertAtEnd(String limitOffsetClause, String sqlStatement) Insert a fragment of SQL right at the very end of the query. | |
| insertBeforeForUpdate | back to summary |
|---|---|
| protected String insertBeforeForUpdate(String limitOffsetClause, String sqlStatement) Insert a fragment of SQL right before the
| |
| processSql | back to summary |
|---|---|
| public String processSql(String sql, Limit limit) Implements org.
| |
| setMaxRows | back to summary |
|---|---|
| public void setMaxRows(Limit limit, PreparedStatement statement) throws SQLException Implements org.
| |
| supportsLimit | back to summary |
|---|---|
| public boolean supportsLimit() Implements org. Doc from org. Does this handler support limiting query results?
| |
| supportsLimitOffset | back to summary |
|---|---|
| public boolean supportsLimitOffset() Implements org. Doc from org. Does this handler support combinations of limit and offset?
| |
| supportsOffset | back to summary |
|---|---|
| public boolean supportsOffset() Implements org. Doc from org. Does this handler support offsetting query results without also specifying a limit?
| |
| supportsVariableLimit | back to summary |
|---|---|
| public boolean supportsVariableLimit() Does this handler support bind variables (JDBC prepared statement parameters) for its limit/offset?
| |
| useMaxForLimit | back to summary |
|---|---|
| public boolean useMaxForLimit() Does the limit clause expect the number of the last row, or the
"page size", the maximum number of rows we want to receive?
Hibernate's
| |