org.springframework.batch.item.database.support

## Class DefaultDataFieldMaxValueIncrementerFactory

- java.lang.Object
- - org.springframework.batch.item.database.support.DefaultDataFieldMaxValueIncrementerFactory

- All Implemented Interfaces:
    DataFieldMaxValueIncrementerFactory

      public class DefaultDataFieldMaxValueIncrementerFactory
      extends java.lang.Object
      implements DataFieldMaxValueIncrementerFactory

  Default implementation of the `DataFieldMaxValueIncrementerFactory` interface. Valid database types are given by the `DatabaseType` enum.
  Author:
    Lucas Ward
  See Also:
    `DatabaseType`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultDataFieldMaxValueIncrementerFactory(javax.sql.DataSource dataSource)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer` | `getIncrementer(java.lang.String incrementerType, java.lang.String incrementerName)` Return the `DataFieldMaxValueIncrementer` for the provided database type.
    `java.lang.String[]` | `getSupportedIncrementerTypes()` Returns the list of supported database incrementer types
    `boolean` | `isSupportedIncrementerType(java.lang.String incrementerType)` Returns boolean indicated whether or not the provided string is supported by this factory.
    `void` | `setIncrementerColumnName(java.lang.String incrementerColumnName)` Public setter for the column name (defaults to "ID") in the incrementer.

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

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

- - ### Constructor Detail

    - #### DefaultDataFieldMaxValueIncrementerFactory

          public DefaultDataFieldMaxValueIncrementerFactory(javax.sql.DataSource dataSource)

  - ### Method Detail

    - #### setIncrementerColumnName

          public void setIncrementerColumnName(java.lang.String incrementerColumnName)

      Public setter for the column name (defaults to "ID") in the incrementer. Only used by some platforms (Derby, HSQL, MySQL, SQL Server and Sybase), and should be fine for use with Spring Batch meta data as long as the default batch schema hasn't been changed.
      Parameters:
        `incrementerColumnName` - the primary key column name to set

    - #### getIncrementer

          public org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer getIncrementer(java.lang.String incrementerType,
                                                                                                          java.lang.String incrementerName)

      Description copied from interface: `DataFieldMaxValueIncrementerFactory`
      Return the `DataFieldMaxValueIncrementer` for the provided database type.
      Specified by:
        `getIncrementer` in interface `DataFieldMaxValueIncrementerFactory`
      Parameters:
        `incrementerType` - string represented database type
        `incrementerName` - incrementer name to create. In many cases this may be the sequence name
      Returns:
        incrementer

    - #### isSupportedIncrementerType

          public boolean isSupportedIncrementerType(java.lang.String incrementerType)

      Description copied from interface: `DataFieldMaxValueIncrementerFactory`
      Returns boolean indicated whether or not the provided string is supported by this factory.
      Specified by:
        `isSupportedIncrementerType` in interface `DataFieldMaxValueIncrementerFactory`

    - #### getSupportedIncrementerTypes

          public java.lang.String[] getSupportedIncrementerTypes()

      Description copied from interface: `DataFieldMaxValueIncrementerFactory`
      Returns the list of supported database incrementer types
      Specified by:
        `getSupportedIncrementerTypes` in interface `DataFieldMaxValueIncrementerFactory`