Class SqlPagingQueryProviderFactoryBean
java.lang.Object
org.springframework.batch.item.database.support.SqlPagingQueryProviderFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<PagingQueryProvider>
public class SqlPagingQueryProviderFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean<PagingQueryProvider>
Factory bean for
PagingQueryProvider
interface. The database type will be
determined from the data source if not provided explicitly. Valid types are given by
the DatabaseType
enum.- Author:
- Dave Syer, Michael Minella, Mahmoud Ben Hassine
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet aPagingQueryProvider
instance using the provided properties and appropriate for the given database type.Always returnsPagingQueryProvider
.boolean
Always returns true.void
setDatabaseType
(String databaseType) void
setDataSource
(DataSource dataSource) void
setFromClause
(String fromClause) void
setGroupClause
(String groupClause) void
setSelectClause
(String selectClause) void
setSortKey
(String key) void
setSortKeys
(Map<String, Order> sortKeys) void
setWhereClause
(String whereClause)
-
Constructor Details
-
SqlPagingQueryProviderFactoryBean
public SqlPagingQueryProviderFactoryBean()
-
-
Method Details
-
setGroupClause
- Parameters:
groupClause
- SQL GROUP BY clause part of the SQL query string
-
setDatabaseType
- Parameters:
databaseType
- the databaseType to set
-
setDataSource
- Parameters:
dataSource
- the dataSource to set
-
setFromClause
- Parameters:
fromClause
- the fromClause to set
-
setWhereClause
- Parameters:
whereClause
- the whereClause to set
-
setSelectClause
- Parameters:
selectClause
- the selectClause to set
-
setSortKeys
- Parameters:
sortKeys
- the sortKeys to set
-
setSortKey
-
getObject
Get aPagingQueryProvider
instance using the provided properties and appropriate for the given database type.- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<PagingQueryProvider>
- Throws:
Exception
- See Also:
-
FactoryBean.getObject()
-
getObjectType
Always returnsPagingQueryProvider
.- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<PagingQueryProvider>
- See Also:
-
FactoryBean.getObjectType()
-
isSingleton
public boolean isSingleton()Always returns true.- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<PagingQueryProvider>
- See Also:
-
FactoryBean.isSingleton()
-