org.springframework.batch.core.launch.support

## Class DataFieldMaxValueJobParametersIncrementer

- java.lang.Object
- - org.springframework.batch.core.launch.support.DataFieldMaxValueJobParametersIncrementer

- All Implemented Interfaces:
    JobParametersIncrementer

      public class DataFieldMaxValueJobParametersIncrementer
      extends java.lang.Object
      implements JobParametersIncrementer

  This incrementer uses a `DataFieldMaxValueIncrementer` to generate the sequence of values to use as job instance discriminator.
  Author:
    Gregory D. Hopkins, Mahmoud Ben Hassine

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_KEY` Default key used as a job parameter.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataFieldMaxValueJobParametersIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer)` Create a new `DataFieldMaxValueJobParametersIncrementer`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer` | `getDataFieldMaxValueIncrementer()` Get the incrementer.
    `java.lang.String` | `getKey()` Get the key.
    `JobParameters` | `getNext(JobParameters jobParameters)` Increment the provided parameters.
    `void` | `setDataFieldMaxValueIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer)` The incrementer to generate the sequence of values.
    `void` | `setKey(java.lang.String key)` The name of the key to use as a job parameter.

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

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

- - ### Field Detail

    - #### DEFAULT_KEY

          public static final java.lang.String DEFAULT_KEY

      Default key used as a job parameter.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DataFieldMaxValueJobParametersIncrementer

          public DataFieldMaxValueJobParametersIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer)

      Create a new `DataFieldMaxValueJobParametersIncrementer`.
      Parameters:
        `dataFieldMaxValueIncrementer` - the incrementer to use to generate the sequence of values. Must not be `null`.

  - ### Method Detail

    - #### getNext

          public JobParameters getNext(JobParameters jobParameters)

      Description copied from interface: `JobParametersIncrementer`
      Increment the provided parameters. If the input is empty, then this should return a bootstrap or initial value to be used on the first instance of a job.
      Specified by:
        `getNext` in interface `JobParametersIncrementer`
      Parameters:
        `jobParameters` - the last value used
      Returns:
        the next value to use (never `null`)

    - #### getKey

          public java.lang.String getKey()

      Get the key. Defaults to `DEFAULT_KEY`.
      Returns:
        the key

    - #### setKey

          public void setKey(java.lang.String key)

      The name of the key to use as a job parameter. Defaults to `DEFAULT_KEY`. Must not be `null` or empty.
      Parameters:
        `key` - the key to set

    - #### getDataFieldMaxValueIncrementer

          public org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer getDataFieldMaxValueIncrementer()

      Get the incrementer.
      Returns:
        the incrementer

    - #### setDataFieldMaxValueIncrementer

          public void setDataFieldMaxValueIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer)

      The incrementer to generate the sequence of values. Must not be `null`.
      Parameters:
        `dataFieldMaxValueIncrementer` - the incrementer to generate the sequence of values