public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implements StepExecutionDao, org.springframework.beans.factory.InitializingBean
StepExecutionDao.DataFieldMaxValueIncrementer
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.StepExecutionDaoDEFAULT_EXIT_MESSAGE_LENGTH, DEFAULT_TABLE_PREFIX| Constructor and Description |
|---|
JdbcStepExecutionDao() |
| Modifier and Type | Method and Description |
|---|---|
void |
addStepExecutions(JobExecution jobExecution)
Retrieve all the
StepExecution for the parent JobExecution. |
void |
afterPropertiesSet() |
StepExecution |
getStepExecution(JobExecution jobExecution,
java.lang.Long stepExecutionId)
Retrieve a
StepExecution from its id. |
void |
saveStepExecution(StepExecution stepExecution)
Save a StepExecution.
|
void |
saveStepExecutions(java.util.Collection<StepExecution> stepExecutions)
Batch insert StepExecutions
|
void |
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.
|
getClobTypeToUse, getJdbcTemplate, getQuery, getTablePrefix, setClobTypeToUse, setJdbcTemplate, setTablePrefixpublic void setExitMessageLength(int exitMessageLength)
exitMessageLength - the exitMessageLength to setpublic void setStepExecutionIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer stepExecutionIncrementer)
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class AbstractJdbcBatchMetadataDaojava.lang.Exceptionpublic void saveStepExecution(StepExecution stepExecution)
saveStepExecution in interface StepExecutionDaostepExecution - StepExecution instance to be saved.StepExecutionDao.saveStepExecution(StepExecution)public void saveStepExecutions(java.util.Collection<StepExecution> stepExecutions)
saveStepExecutions in interface StepExecutionDaostepExecutions - a collection of JobExecution instances to be saved.StepExecutionDao.saveStepExecutions(Collection)public void updateStepExecution(StepExecution stepExecution)
StepExecutionDaoupdateStepExecution in interface StepExecutionDaostepExecution - StepExecution instance to be updated.@Nullable public StepExecution getStepExecution(JobExecution jobExecution, java.lang.Long stepExecutionId)
StepExecutionDaoStepExecution from its id.getStepExecution in interface StepExecutionDaojobExecution - the parent JobExecutionstepExecutionId - the step execution idStepExecutionpublic void addStepExecutions(JobExecution jobExecution)
StepExecutionDaoStepExecution for the parent JobExecution.addStepExecutions in interface StepExecutionDaojobExecution - the parent job execution