类 JsrJobParametersConverter
- java.lang.Object
- org.springframework.batch.core.jsr.JsrJobParametersConverter
- 所有已实现的接口:
JobParametersConverter
,org.springframework.beans.factory.InitializingBean
public class JsrJobParametersConverter extends java.lang.Object implements JobParametersConverter, org.springframework.beans.factory.InitializingBean
Provides default conversion methodology for JSR-352's implementation. Since Spring Batch uses job parameters as a way of identifying a job instance, this converter will add an additional identifying parameter if it does not exist already in the list. The id for the identifying parameter will come from the JOB_SEQ sequence as used to generate the unique ids for BATCH_JOB_INSTANCE records.- 从以下版本开始:
- 3.0
- 作者:
- Michael Minella, Mahmoud Ben Hassine
字段概要
字段 修饰符和类型 字段 说明 javax.sql.DataSource
dataSource
org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer
incrementer
static java.lang.String
JOB_RUN_ID
java.lang.String
tablePrefix
构造器概要
构造器 构造器 说明 JsrJobParametersConverter(javax.sql.DataSource dataSource)
Main constructor.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
JobParameters
getJobParameters(java.util.Properties properties)
Get a newJobParameters
instance.java.util.Properties
getProperties(JobParameters params)
The inverse operation: get aProperties
instance.void
setTablePrefix(java.lang.String tablePrefix)
The table prefix used in the currentJobRepository
字段详细资料
JOB_RUN_ID
public static final java.lang.String JOB_RUN_ID
- 另请参阅:
- 常量字段值
incrementer
public org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer incrementer
tablePrefix
public java.lang.String tablePrefix
dataSource
public javax.sql.DataSource dataSource
构造器详细资料
JsrJobParametersConverter
public JsrJobParametersConverter(javax.sql.DataSource dataSource)
Main constructor.- 参数:
dataSource
- used to gain access to the database to get unique ids.
方法详细资料
setTablePrefix
public void setTablePrefix(java.lang.String tablePrefix)
The table prefix used in the currentJobRepository
- 参数:
tablePrefix
- the table prefix used for the job repository tables
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- 指定者:
afterPropertiesSet
在接口中org.springframework.beans.factory.InitializingBean
- 抛出:
java.lang.Exception
getJobParameters
public JobParameters getJobParameters(@Nullable java.util.Properties properties)
从接口复制的说明:JobParametersConverter
Get a newJobParameters
instance. If given null, or an empty properties, an empty JobParameters will be returned.- 指定者:
getJobParameters
在接口中JobParametersConverter
- 参数:
properties
- the runtime parameters in the form of String literals.- 返回:
- a
JobParameters
properties converted to the correct types.
getProperties
public java.util.Properties getProperties(@Nullable JobParameters params)
从接口复制的说明:JobParametersConverter
The inverse operation: get aProperties
instance. If given null or empty JobParameters, an empty Properties should be returned.- 指定者:
getProperties
在接口中JobParametersConverter
- 参数:
params
- theJobParameters
instance to be converted.- 返回:
- a representation of the parameters as properties