org.springframework.batch.item.database.support
Class SqlWindowingPagingQueryProvider
java.lang.Object
org.springframework.batch.item.database.support.AbstractSqlPagingQueryProvider
org.springframework.batch.item.database.support.SqlWindowingPagingQueryProvider
- All Implemented Interfaces:
- PagingQueryProvider
- Direct Known Subclasses:
- Db2PagingQueryProvider, DerbyPagingQueryProvider, SqlServerPagingQueryProvider, SybasePagingQueryProvider
public class SqlWindowingPagingQueryProvider
- extends AbstractSqlPagingQueryProvider
Generic Paging Query Provider using standard SQL:2003 windowing functions.
These features are supported by DB2, Oracle, SQL Server 2005, Sybase and
Apache Derby version 10.4.1.3
- Since:
- 2.0
- Author:
- Thomas Risberg
Methods inherited from class org.springframework.batch.item.database.support.AbstractSqlPagingQueryProvider |
getFromClause, getParameterCount, getSelectClause, getSortKey, getSortKeyPlaceHolder, getSortKeyWithoutAlias, getWhereClause, init, isAscending, isUsingNamedParameters, setAscending, setFromClause, setSelectClause, setSortKey, setWhereClause |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SqlWindowingPagingQueryProvider
public SqlWindowingPagingQueryProvider()
generateFirstPageQuery
public String generateFirstPageQuery(int pageSize)
- Description copied from class:
AbstractSqlPagingQueryProvider
- Method generating the query string to be used for retrieving the first
page. This method must be implemented in sub classes.
- Specified by:
generateFirstPageQuery
in interface PagingQueryProvider
- Specified by:
generateFirstPageQuery
in class AbstractSqlPagingQueryProvider
- Parameters:
pageSize
- number of rows to read per page
- Returns:
- query string
getSubQueryAlias
protected Object getSubQueryAlias()
extractTableAlias
protected Object extractTableAlias()
generateRemainingPagesQuery
public String generateRemainingPagesQuery(int pageSize)
- Description copied from class:
AbstractSqlPagingQueryProvider
- Method generating the query string to be used for retrieving the pages
following the first page. This method must be implemented in sub classes.
- Specified by:
generateRemainingPagesQuery
in interface PagingQueryProvider
- Specified by:
generateRemainingPagesQuery
in class AbstractSqlPagingQueryProvider
- Parameters:
pageSize
- number of rows to read per page
- Returns:
- query string
generateJumpToItemQuery
public String generateJumpToItemQuery(int itemIndex,
int pageSize)
- Description copied from class:
AbstractSqlPagingQueryProvider
- Method generating the query string to be used for jumping to a specific
item position. This method must be implemented in sub classes.
- Specified by:
generateJumpToItemQuery
in interface PagingQueryProvider
- Specified by:
generateJumpToItemQuery
in class AbstractSqlPagingQueryProvider
- Parameters:
itemIndex
- the index of the item to jump topageSize
- number of rows to read per page
- Returns:
- query string
getOverClause
protected String getOverClause()
getOverSubstituteClauseStart
protected String getOverSubstituteClauseStart()
getOverSubstituteClauseEnd
protected String getOverSubstituteClauseEnd()
Copyright © 2013 SpringSource. All Rights Reserved.