类 JdbcStepExecutionDao
- java.lang.Object
- org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao
- org.springframework.batch.core.repository.dao.JdbcStepExecutionDao
- 所有已实现的接口:
StepExecutionDao
,org.springframework.beans.factory.InitializingBean
public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implements StepExecutionDao, org.springframework.beans.factory.InitializingBean
JDBC implementation ofStepExecutionDao
.
Allows customization of the tables names used by Spring Batch for step meta data via a prefix property.
Uses sequences or tables (via Spring'sDataFieldMaxValueIncrementer
abstraction) to create all primary keys before inserting a new row. All objects are checked to ensure all fields to be stored are not null. If any are found to be null, an IllegalArgumentException will be thrown. This could be left to JdbcTemplate, however, the exception will be fairly vague, and fails to highlight which field caused the exception.- 作者:
- Lucas Ward, Dave Syer, Robert Kasanicky, David Turanski, Mahmoud Ben Hassine
- 另请参阅:
StepExecutionDao
字段概要
从类继承的字段 org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao
DEFAULT_EXIT_MESSAGE_LENGTH, DEFAULT_TABLE_PREFIX
构造器概要
构造器 构造器 说明 JdbcStepExecutionDao()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
addStepExecutions(JobExecution jobExecution)
Retrieve all theStepExecution
for the parentJobExecution
.void
afterPropertiesSet()
StepExecution
getStepExecution(JobExecution jobExecution, java.lang.Long stepExecutionId)
Retrieve aStepExecution
from its id.void
saveStepExecution(StepExecution stepExecution)
Save a StepExecution.void
saveStepExecutions(java.util.Collection<StepExecution> stepExecutions)
Batch insert StepExecutionsvoid
setExitMessageLength(int exitMessageLength)
Public setter for the exit message length in database.void
setStepExecutionIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer stepExecutionIncrementer)
void
updateStepExecution(StepExecution stepExecution)
Update the given StepExecution Preconditions: Id must not be null.从类继承的方法 org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao
getClobTypeToUse, getJdbcTemplate, getQuery, getTablePrefix, setClobTypeToUse, setJdbcTemplate, setTablePrefix
构造器详细资料
JdbcStepExecutionDao
public JdbcStepExecutionDao()
方法详细资料
setExitMessageLength
public void setExitMessageLength(int exitMessageLength)
Public setter for the exit message length in database. Do not set this if you haven't modified the schema.- 参数:
exitMessageLength
- the exitMessageLength to set
setStepExecutionIncrementer
public void setStepExecutionIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer stepExecutionIncrementer)
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- 指定者:
afterPropertiesSet
在接口中org.springframework.beans.factory.InitializingBean
- 覆盖:
afterPropertiesSet
在类中AbstractJdbcBatchMetadataDao
- 抛出:
java.lang.Exception
saveStepExecution
public void saveStepExecution(StepExecution stepExecution)
Save a StepExecution. A unique id will be generated by the stepExecutionIncrementer, and then set in the StepExecution. All values will then be stored via an INSERT statement.- 指定者:
saveStepExecution
在接口中StepExecutionDao
- 参数:
stepExecution
-StepExecution
instance to be saved.- 另请参阅:
StepExecutionDao.saveStepExecution(StepExecution)
saveStepExecutions
public void saveStepExecutions(java.util.Collection<StepExecution> stepExecutions)
Batch insert StepExecutions- 指定者:
saveStepExecutions
在接口中StepExecutionDao
- 参数:
stepExecutions
- a collection ofJobExecution
instances to be saved.- 另请参阅:
StepExecutionDao.saveStepExecutions(Collection)
updateStepExecution
public void updateStepExecution(StepExecution stepExecution)
从接口复制的说明:StepExecutionDao
Update the given StepExecution Preconditions: Id must not be null.- 指定者:
updateStepExecution
在接口中StepExecutionDao
- 参数:
stepExecution
-StepExecution
instance to be updated.
getStepExecution
@Nullable public StepExecution getStepExecution(JobExecution jobExecution, java.lang.Long stepExecutionId)
从接口复制的说明:StepExecutionDao
Retrieve aStepExecution
from its id.- 指定者:
getStepExecution
在接口中StepExecutionDao
- 参数:
jobExecution
- the parentJobExecution
stepExecutionId
- the step execution id- 返回:
- a
StepExecution
addStepExecutions
public void addStepExecutions(JobExecution jobExecution)
从接口复制的说明:StepExecutionDao
Retrieve all theStepExecution
for the parentJobExecution
.- 指定者:
addStepExecutions
在接口中StepExecutionDao
- 参数:
jobExecution
- the parent job execution