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
  • Constructor Details

    • SqlPagingQueryProviderFactoryBean

      public SqlPagingQueryProviderFactoryBean()
  • Method Details

    • setGroupClause

      public void setGroupClause(String groupClause)
      Parameters:
      groupClause - SQL GROUP BY clause part of the SQL query string
    • setDatabaseType

      public void setDatabaseType(String databaseType)
      Parameters:
      databaseType - the databaseType to set
    • setDataSource

      public void setDataSource(DataSource dataSource)
      Parameters:
      dataSource - the dataSource to set
    • setFromClause

      public void setFromClause(String fromClause)
      Parameters:
      fromClause - the fromClause to set
    • setWhereClause

      public void setWhereClause(String whereClause)
      Parameters:
      whereClause - the whereClause to set
    • setSelectClause

      public void setSelectClause(String selectClause)
      Parameters:
      selectClause - the selectClause to set
    • setSortKeys

      public void setSortKeys(Map<String,Order> sortKeys)
      Parameters:
      sortKeys - the sortKeys to set
    • setSortKey

      public void setSortKey(String key)
    • getObject

      public PagingQueryProvider getObject() throws Exception
      Get a PagingQueryProvider instance using the provided properties and appropriate for the given database type.
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<PagingQueryProvider>
      Throws:
      Exception
      See Also:
      • FactoryBean.getObject()
    • getObjectType

      public Class<PagingQueryProvider> getObjectType()
      Always returns PagingQueryProvider.
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<PagingQueryProvider>
      See Also:
      • FactoryBean.getObjectType()
    • isSingleton

      public boolean isSingleton()
      Always returns true.
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<PagingQueryProvider>
      See Also:
      • FactoryBean.isSingleton()