Top Description Fields Constructors Methods
org.hibernate.dialect.pagination

public Class NoopLimitHandler

extends AbstractLimitHandler
Class Inheritance
Imports
java.sql.PreparedStatement, .SQLException, org.hibernate.engine.spi.RowSelection

Handler not supporting query LIMIT clause. JDBC API is used to set maximum number of returned rows.
Author
Lukasz Antoniak (lukasz dot antoniak at gmail dot com)

Field Summary

Modifier and TypeField and Description
public static final NoopLimitHandler

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
bindLimitParametersAtEndOfQuery(RowSelection
the selection criteria for rows.
selection
,
PreparedStatement
Statement to which to bind limit parameter values.
statement
,
int
Index from which to start binding.
index
)

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.bindLimitParametersAtEndOfQuery.

Implements org.hibernate.dialect.pagination.LimitHandler.bindLimitParametersAtEndOfQuery.

Bind parameter values needed by the LIMIT clause after original SELECT statement.
public int
bindLimitParametersAtStartOfQuery(RowSelection
the selection criteria for rows.
selection
,
PreparedStatement
Statement to which to bind limit parameter values.
statement
,
int
Index from which to start binding.
index
)

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.bindLimitParametersAtStartOfQuery.

Implements org.hibernate.dialect.pagination.LimitHandler.bindLimitParametersAtStartOfQuery.

Bind parameter values needed by the LIMIT clause before original SELECT statement.
public String
processSql(String
the SQL query to process.
sql
,
RowSelection
the selection criteria for rows.
selection
)

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.processSql.

Implements org.hibernate.dialect.pagination.LimitHandler.processSql.

Return processed SQL query.
public void
setMaxRows(RowSelection
the selection criteria for rows.
selection
,
PreparedStatement
Statement which number of returned rows shall be limited.
statement
)

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.setMaxRows.

Implements org.hibernate.dialect.pagination.LimitHandler.setMaxRows.

Use JDBC API to limit the number of rows returned by the SQL query.
Inherited from org.hibernate.dialect.pagination.AbstractLimitHandler:
bindLimitParametersbindLimitParametersFirstbindLimitParametersInReverseOrderconvertToFirstRowValueforceLimitUsagegetMaxOrLimitsupportsLimitsupportsLimitOffsetsupportsVariableLimituseMaxForLimit

Field Detail

INSTANCEback to summary
public static final NoopLimitHandler INSTANCE

Constructor Detail

NoopLimitHandlerback to summary
private NoopLimitHandler()

Method Detail

bindLimitParametersAtEndOfQueryback to summary
public int bindLimitParametersAtEndOfQuery(RowSelection selection, PreparedStatement statement, int index)

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.bindLimitParametersAtEndOfQuery.

Implements org.hibernate.dialect.pagination.LimitHandler.bindLimitParametersAtEndOfQuery.

Doc from org.hibernate.dialect.pagination.LimitHandler.bindLimitParametersAtEndOfQuery.

Bind parameter values needed by the LIMIT clause after original SELECT statement.

Parameters
selection:RowSelection

the selection criteria for rows.

statement:PreparedStatement

Statement to which to bind limit parameter values.

index:int

Index from which to start binding.

Returns:int

The number of parameter values bound.

Annotations
@Override
bindLimitParametersAtStartOfQueryback to summary
public int bindLimitParametersAtStartOfQuery(RowSelection selection, PreparedStatement statement, int index)

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.bindLimitParametersAtStartOfQuery.

Implements org.hibernate.dialect.pagination.LimitHandler.bindLimitParametersAtStartOfQuery.

Doc from org.hibernate.dialect.pagination.LimitHandler.bindLimitParametersAtStartOfQuery.

Bind parameter values needed by the LIMIT clause before original SELECT statement.

Parameters
selection:RowSelection

the selection criteria for rows.

statement:PreparedStatement

Statement to which to bind limit parameter values.

index:int

Index from which to start binding.

Returns:int

The number of parameter values bound.

Annotations
@Override
processSqlback to summary
public String processSql(String sql, RowSelection selection)

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.processSql.

Implements org.hibernate.dialect.pagination.LimitHandler.processSql.

Doc from org.hibernate.dialect.pagination.LimitHandler.processSql.

Return processed SQL query.

Parameters
sql:String

the SQL query to process.

selection:RowSelection

the selection criteria for rows.

Returns:String

Query statement with LIMIT clause applied.

Annotations
@Override
setMaxRowsback to summary
public void setMaxRows(RowSelection selection, PreparedStatement statement) throws SQLException

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.setMaxRows.

Implements org.hibernate.dialect.pagination.LimitHandler.setMaxRows.

Doc from org.hibernate.dialect.pagination.LimitHandler.setMaxRows.

Use JDBC API to limit the number of rows returned by the SQL query. Typically handlers that do not support LIMIT clause should implement this method.

Parameters
selection:RowSelection

the selection criteria for rows.

statement:PreparedStatement

Statement which number of returned rows shall be limited.

Annotations
@Override
Exceptions
SQLException:
Indicates problems while limiting maximum rows returned.