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, Michael Minella
Constructor Summary
Constructors Constructor Description SqlWindowingPagingQueryProvider()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectextractTableAlias()java.lang.StringgenerateFirstPageQuery(int pageSize)Method generating the query string to be used for retrieving the first page.java.lang.StringgenerateJumpToItemQuery(int itemIndex, int pageSize)Method generating the query string to be used for jumping to a specific item position.java.lang.StringgenerateRemainingPagesQuery(int pageSize)Method generating the query string to be used for retrieving the pages following the first page.protected java.lang.StringgetOrderedQueryAlias()protected java.lang.StringgetOverClause()protected java.lang.StringgetOverSubstituteClauseEnd()protected java.lang.StringgetOverSubstituteClauseStart()protected java.lang.ObjectgetSubQueryAlias()Methods inherited from class org.springframework.batch.item.database.support.AbstractSqlPagingQueryProvider
getFromClause, getGroupClause, getParameterCount, getSelectClause, getSortKeyPlaceHolder, getSortKeys, getSortKeysWithoutAliases, getWhereClause, init, isUsingNamedParameters, setFromClause, setGroupClause, setSelectClause, setSortKeys, setWhereClause
Method Detail
generateFirstPageQuery
public java.lang.String generateFirstPageQuery(int pageSize)
Description copied from class:AbstractSqlPagingQueryProviderMethod generating the query string to be used for retrieving the first page. This method must be implemented in sub classes.- Specified by:
generateFirstPageQueryin interfacePagingQueryProvider- Specified by:
generateFirstPageQueryin classAbstractSqlPagingQueryProvider- Parameters:
pageSize- number of rows to read per page- Returns:
- query string
getOrderedQueryAlias
protected java.lang.String getOrderedQueryAlias()
getSubQueryAlias
protected java.lang.Object getSubQueryAlias()
extractTableAlias
protected java.lang.Object extractTableAlias()
generateRemainingPagesQuery
public java.lang.String generateRemainingPagesQuery(int pageSize)
Description copied from class:AbstractSqlPagingQueryProviderMethod 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:
generateRemainingPagesQueryin interfacePagingQueryProvider- Specified by:
generateRemainingPagesQueryin classAbstractSqlPagingQueryProvider- Parameters:
pageSize- number of rows to read per page- Returns:
- query string
generateJumpToItemQuery
public java.lang.String generateJumpToItemQuery(int itemIndex, int pageSize)Description copied from class:AbstractSqlPagingQueryProviderMethod generating the query string to be used for jumping to a specific item position. This method must be implemented in sub classes.- Specified by:
generateJumpToItemQueryin interfacePagingQueryProvider- Specified by:
generateJumpToItemQueryin classAbstractSqlPagingQueryProvider- Parameters:
itemIndex- the index of the item to jump topageSize- number of rows to read per page- Returns:
- query string
getOverClause
protected java.lang.String getOverClause()
getOverSubstituteClauseStart
protected java.lang.String getOverSubstituteClauseStart()
getOverSubstituteClauseEnd
protected java.lang.String getOverSubstituteClauseEnd()