类 JobRepositoryFactoryBean
- java.lang.Object
- org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean
- org.springframework.batch.core.repository.support.JobRepositoryFactoryBean
- 所有已实现的接口:
org.springframework.beans.factory.FactoryBean<JobRepository>
,org.springframework.beans.factory.InitializingBean
public class JobRepositoryFactoryBean extends AbstractJobRepositoryFactoryBean implements org.springframework.beans.factory.InitializingBean
AFactoryBean
that automates the creation of aSimpleJobRepository
using JDBC DAO implementations which persist batch metadata in database. Requires the user to describe what kind of database they are using.- 作者:
- Ben Hale, Lucas Ward, Dave Syer, Michael Minella
字段概要
字段 修饰符和类型 字段 说明 protected static org.apache.commons.logging.Log
logger
构造器概要
构造器 构造器 说明 JobRepositoryFactoryBean()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
protected ExecutionContextDao
createExecutionContextDao()
protected JobExecutionDao
createJobExecutionDao()
protected JobInstanceDao
createJobInstanceDao()
protected StepExecutionDao
createStepExecutionDao()
void
setClobType(int type)
void
setDatabaseType(java.lang.String dbType)
Sets the database type.void
setDataSource(javax.sql.DataSource dataSource)
Public setter for theDataSource
.void
setIncrementerFactory(DataFieldMaxValueIncrementerFactory incrementerFactory)
void
setJdbcOperations(org.springframework.jdbc.core.JdbcOperations jdbcOperations)
Public setter for theJdbcOperations
.void
setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
A special handler for large objects.void
setMaxVarCharLength(int maxVarCharLength)
Public setter for the length of long string columns in database.void
setSerializer(ExecutionContextSerializer serializer)
A custom implementation of theExecutionContextSerializer
.void
setTablePrefix(java.lang.String tablePrefix)
Sets the table prefix for all the batch meta-data tables.从类继承的方法 org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean
getJobRepository, getObject, getObjectType, getTransactionManager, isSingleton, setIsolationLevelForCreate, setTransactionManager, setValidateTransactionState
字段详细资料
logger
protected static final org.apache.commons.logging.Log logger
构造器详细资料
JobRepositoryFactoryBean
public JobRepositoryFactoryBean()
方法详细资料
setClobType
public void setClobType(int type)
- 参数:
type
- a value from theTypes
class to indicate the type to use for a CLOB
setSerializer
public void setSerializer(ExecutionContextSerializer serializer)
A custom implementation of theExecutionContextSerializer
. The default, if not injected, is theJackson2ExecutionContextStringSerializer
.- 参数:
serializer
- used to serialize/deserializeExecutionContext
- 另请参阅:
ExecutionContextSerializer
setLobHandler
public void setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
A special handler for large objects. The default is usually fine, except for some (usually older) versions of Oracle. The default is determined from the data base type.- 参数:
lobHandler
- theLobHandler
to set- 另请参阅:
LobHandler
setMaxVarCharLength
public void setMaxVarCharLength(int maxVarCharLength)
Public setter for the length of long string columns in database. Do not set this if you haven't modified the schema. Note this value will be used for the exit message in bothJdbcJobExecutionDao
andJdbcStepExecutionDao
and also the short version of the execution context inJdbcExecutionContextDao
. For databases with multi-byte character sets this number can be smaller (by up to a factor of 2 for 2-byte characters) than the declaration of the column length in the DDL for the tables.- 参数:
maxVarCharLength
- the exitMessageLength to set
setDataSource
public void setDataSource(javax.sql.DataSource dataSource)
Public setter for theDataSource
.- 参数:
dataSource
- aDataSource
setJdbcOperations
public void setJdbcOperations(org.springframework.jdbc.core.JdbcOperations jdbcOperations)
Public setter for theJdbcOperations
. If this property is not set explicitly, a newJdbcTemplate
will be created for the configured DataSource by default.- 参数:
jdbcOperations
- aJdbcOperations
setDatabaseType
public void setDatabaseType(java.lang.String dbType)
Sets the database type.- 参数:
dbType
- as specified byDefaultDataFieldMaxValueIncrementerFactory
setTablePrefix
public void setTablePrefix(java.lang.String tablePrefix)
Sets the table prefix for all the batch meta-data tables.- 参数:
tablePrefix
- prefix prepended to batch meta-data tables
setIncrementerFactory
public void setIncrementerFactory(DataFieldMaxValueIncrementerFactory incrementerFactory)
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- 指定者:
afterPropertiesSet
在接口中org.springframework.beans.factory.InitializingBean
- 覆盖:
afterPropertiesSet
在类中AbstractJobRepositoryFactoryBean
- 抛出:
java.lang.Exception
createJobInstanceDao
protected JobInstanceDao createJobInstanceDao() throws java.lang.Exception
- 指定者:
createJobInstanceDao
在类中AbstractJobRepositoryFactoryBean
- 返回:
- fully configured
JobInstanceDao
implementation. - 抛出:
java.lang.Exception
- thrown if error occurs creating JobInstanceDao.
createJobExecutionDao
protected JobExecutionDao createJobExecutionDao() throws java.lang.Exception
- 指定者:
createJobExecutionDao
在类中AbstractJobRepositoryFactoryBean
- 返回:
- fully configured
JobExecutionDao
implementation. - 抛出:
java.lang.Exception
- thrown if error occurs creating JobExecutionDao.
createStepExecutionDao
protected StepExecutionDao createStepExecutionDao() throws java.lang.Exception
- 指定者:
createStepExecutionDao
在类中AbstractJobRepositoryFactoryBean
- 返回:
- fully configured
StepExecutionDao
implementation. - 抛出:
java.lang.Exception
- thrown if error occurs creating StepExecutionDao.
createExecutionContextDao
protected ExecutionContextDao createExecutionContextDao() throws java.lang.Exception
- 指定者:
createExecutionContextDao
在类中AbstractJobRepositoryFactoryBean
- 返回:
- fully configured
ExecutionContextDao
implementation. - 抛出:
java.lang.Exception
- thrown if error occurs creating ExecutionContextDao.