public class JsrJobParametersConverter extends java.lang.Object implements JobParametersConverter, org.springframework.beans.factory.InitializingBean
| Modifier and Type | Field and Description |
|---|---|
javax.sql.DataSource |
dataSource |
org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer |
incremeter |
static java.lang.String |
JOB_RUN_ID |
java.lang.String |
tablePrefix |
| Constructor and Description |
|---|
JsrJobParametersConverter(javax.sql.DataSource dataSource)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
JobParameters |
getJobParameters(java.util.Properties properties)
Get a new
JobParameters instance. |
java.util.Properties |
getProperties(JobParameters params)
The inverse operation: get a
Properties instance. |
void |
setTablePrefix(java.lang.String tablePrefix)
The table prefix used in the current
JobRepository |
public static final java.lang.String JOB_RUN_ID
public org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer incremeter
public java.lang.String tablePrefix
public javax.sql.DataSource dataSource
public JsrJobParametersConverter(javax.sql.DataSource dataSource)
dataSource - used to gain access to the database to get unique ids.public void setTablePrefix(java.lang.String tablePrefix)
JobRepositorytablePrefix - the table prefix used for the job repository tablespublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic JobParameters getJobParameters(java.util.Properties properties)
JobParametersConverterJobParameters instance. If given null, or an empty
properties, an empty JobParameters will be returned.getJobParameters in interface JobParametersConverterproperties - the runtime parameters in the form of String literals.JobParameters properties converted to the correct
types.public java.util.Properties getProperties(JobParameters params)
JobParametersConverterProperties instance. If given null
or empty JobParameters, an empty Properties should be returned.getProperties in interface JobParametersConverter