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
-
Constructor Summary
ConstructorDescriptionDataFieldMaxValueJobParametersIncrementer
(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer) Create a newDataFieldMaxValueJobParametersIncrementer
. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer
Get the incrementer.getKey()
Get the key.getNext
(JobParameters jobParameters) Increments the provided parameters.void
setDataFieldMaxValueIncrementer
(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer) The incrementer to generate the sequence of values.void
The name of the key to use as a job parameter.
-
Field Details
-
DEFAULT_KEY
Default key used as a job parameter.- See Also:
-
-
Constructor Details
-
DataFieldMaxValueJobParametersIncrementer
public DataFieldMaxValueJobParametersIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer) Create a newDataFieldMaxValueJobParametersIncrementer
.- Parameters:
dataFieldMaxValueIncrementer
- the incrementer to use to generate the sequence of values. Must not benull
.
-
-
Method Details
-
getNext
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 interfaceJobParametersIncrementer
- Parameters:
jobParameters
- the last value used- Returns:
- the next value to use (never
null
)
-
getKey
Get the key. Defaults toDEFAULT_KEY
.- Returns:
- the key
-
setKey
The name of the key to use as a job parameter. Defaults toDEFAULT_KEY
. Must not benull
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 benull
.- Parameters:
dataFieldMaxValueIncrementer
- the incrementer to generate the sequence of values
-