org.hibernate.dialect.pagination
Class NoopLimitHandler
java.lang.Object
org.hibernate.dialect.pagination.AbstractLimitHandler
org.hibernate.dialect.pagination.NoopLimitHandler
- All Implemented Interfaces:
- LimitHandler
public class NoopLimitHandler
- extends AbstractLimitHandler
Handler not supporting query LIMIT clause. JDBC API is used to set maximum number of returned rows.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NoopLimitHandler
public NoopLimitHandler(String sql,
RowSelection selection)
getProcessedSql
public String getProcessedSql()
- Description copied from interface:
LimitHandler
- Return processed SQL query.
- Specified by:
getProcessedSql
in interface LimitHandler
- Overrides:
getProcessedSql
in class AbstractLimitHandler
- Returns:
- Query statement with LIMIT clause applied.
bindLimitParametersAtStartOfQuery
public int bindLimitParametersAtStartOfQuery(PreparedStatement statement,
int index)
- Description copied from interface:
LimitHandler
- Bind parameter values needed by the LIMIT clause before original SELECT statement.
- Specified by:
bindLimitParametersAtStartOfQuery
in interface LimitHandler
- Overrides:
bindLimitParametersAtStartOfQuery
in class AbstractLimitHandler
- Parameters:
statement
- Statement to which to bind limit parameter values.index
- Index from which to start binding.
- Returns:
- The number of parameter values bound.
bindLimitParametersAtEndOfQuery
public int bindLimitParametersAtEndOfQuery(PreparedStatement statement,
int index)
- Description copied from interface:
LimitHandler
- Bind parameter values needed by the LIMIT clause after original SELECT statement.
- Specified by:
bindLimitParametersAtEndOfQuery
in interface LimitHandler
- Overrides:
bindLimitParametersAtEndOfQuery
in class AbstractLimitHandler
- Parameters:
statement
- Statement to which to bind limit parameter values.index
- Index from which to start binding.
- Returns:
- The number of parameter values bound.
setMaxRows
public void setMaxRows(PreparedStatement statement)
throws SQLException
- Description copied from interface:
LimitHandler
- 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.
- Specified by:
setMaxRows
in interface LimitHandler
- Overrides:
setMaxRows
in class AbstractLimitHandler
- Parameters:
statement
- Statement which number of returned rows shall be limited.
- Throws:
SQLException
- Indicates problems while limiting maximum rows returned.
Copyright © 2001-2013 Red Hat, Inc. All Rights Reserved.