org.springframework.batch.item.database.support

## 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 java.lang.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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SqlPagingQueryProviderFactoryBean()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PagingQueryProvider` | `getObject()` Get a `PagingQueryProvider` instance using the provided properties and appropriate for the given database type.
    `java.lang.Class<PagingQueryProvider>` | `getObjectType()` Always returns `PagingQueryProvider`.
    `boolean` | `isSingleton()` Always returns true.
    `void` | `setDatabaseType(java.lang.String databaseType)`
    `void` | `setDataSource(javax.sql.DataSource dataSource)`
    `void` | `setFromClause(java.lang.String fromClause)`
    `void` | `setGroupClause(java.lang.String groupClause)`
    `void` | `setSelectClause(java.lang.String selectClause)`
    `void` | `setSortKey(java.lang.String key)`
    `void` | `setSortKeys(java.util.Map<java.lang.String,Order> sortKeys)`
    `void` | `setWhereClause(java.lang.String whereClause)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SqlPagingQueryProviderFactoryBean

          public SqlPagingQueryProviderFactoryBean()

  - ### Method Detail

    - #### setGroupClause

          public void setGroupClause(java.lang.String groupClause)

      Parameters:
        `groupClause` - SQL GROUP BY clause part of the SQL query string

    - #### setDatabaseType

          public void setDatabaseType(java.lang.String databaseType)

      Parameters:
        `databaseType` - the databaseType to set

    - #### setDataSource

          public void setDataSource(javax.sql.DataSource dataSource)

      Parameters:
        `dataSource` - the dataSource to set

    - #### setFromClause

          public void setFromClause(java.lang.String fromClause)

      Parameters:
        `fromClause` - the fromClause to set

    - #### setWhereClause

          public void setWhereClause(java.lang.String whereClause)

      Parameters:
        `whereClause` - the whereClause to set

    - #### setSelectClause

          public void setSelectClause(java.lang.String selectClause)

      Parameters:
        `selectClause` - the selectClause to set

    - #### setSortKeys

          public void setSortKeys(java.util.Map<java.lang.String,Order> sortKeys)

      Parameters:
        `sortKeys` - the sortKeys to set

    - #### setSortKey

          public void setSortKey(java.lang.String key)

    - #### getObject

          public PagingQueryProvider getObject()
                                        throws java.lang.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:
        `java.lang.Exception`
      See Also:
        `FactoryBean.getObject()`

    - #### getObjectType

          public java.lang.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()`