类 DefaultJobParametersExtractor
- java.lang.Object
- org.springframework.batch.core.step.job.DefaultJobParametersExtractor
- 所有已实现的接口:
JobParametersExtractor
public class DefaultJobParametersExtractor extends java.lang.Object implements JobParametersExtractor
Simple implementation ofJobParametersExtractor
which pulls parameters with named keys out of the step execution context and the job parameters of the surrounding job.- 作者:
- Dave Syer, Will Schipp
构造器概要
构造器 构造器 说明 DefaultJobParametersExtractor()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 JobParameters
getJobParameters(Job job, StepExecution stepExecution)
Extract job parameters from the step execution, for example from the execution context or other properties.void
setKeys(java.lang.String[] keys)
The key names to pull out of the execution context or job parameters, if they exist.void
setUseAllParentParameters(boolean useAllParentParameters)
setter to support switching off all parent parameters
构造器详细资料
DefaultJobParametersExtractor
public DefaultJobParametersExtractor()
方法详细资料
setKeys
public void setKeys(java.lang.String[] keys)
The key names to pull out of the execution context or job parameters, if they exist. If a key doesn't exist in the execution context then the job parameters from the enclosing job execution are tried, and if there is nothing there either then no parameter is extracted. Key names ending with(long)
,(int)
,(double)
,(date)
or(string)
will be assumed to refer to values of the respective type and assigned to job parameters accordingly (there will be an error if they are not of the right type). Without a special suffix in that form a parameter is assumed to be of type String.- 参数:
keys
- the keys to set
getJobParameters
public JobParameters getJobParameters(Job job, StepExecution stepExecution)
从接口复制的说明:JobParametersExtractor
Extract job parameters from the step execution, for example from the execution context or other properties.- 指定者:
getJobParameters
在接口中JobParametersExtractor
- 参数:
job
- aJob
stepExecution
- aStepExecution
- 返回:
- some
JobParameters
- 另请参阅:
JobParametersExtractor.getJobParameters(Job, StepExecution)
setUseAllParentParameters
public void setUseAllParentParameters(boolean useAllParentParameters)
setter to support switching off all parent parameters- 参数:
useAllParentParameters
- if false do not include parent parameters. True if all parent parameters need to be included.