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 Details

  • Constructor Details

    • DataFieldMaxValueJobParametersIncrementer

      public DataFieldMaxValueJobParametersIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer)
      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
      Increments the provided parameters. If the input is empty, this method 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