Package 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 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
  Description
  `static final String`
  `DEFAULT_KEY`
  Default key used as a job parameter.

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer`
  `getDataFieldMaxValueIncrementer()`
  Get the incrementer.
  `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(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 Details

  - ### DEFAULT_KEY

    public static final String DEFAULT_KEY
    Default key used as a job parameter.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### 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 Details

  - ### 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 String getKey()
    Get the key. Defaults to `DEFAULT_KEY`.
    Returns:
      the key

  - ### setKey

    public void setKey(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