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.StepExecutionDao
DEFAULT_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, setTablePrefix
public 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.InitializingBean
afterPropertiesSet
in class AbstractJdbcBatchMetadataDao
java.lang.Exception
public void saveStepExecution(StepExecution stepExecution)
saveStepExecution
in interface StepExecutionDao
stepExecution
- StepExecution
instance to be saved.StepExecutionDao.saveStepExecution(StepExecution)
public void saveStepExecutions(java.util.Collection<StepExecution> stepExecutions)
saveStepExecutions
in interface StepExecutionDao
stepExecutions
- a collection of JobExecution
instances to be saved.StepExecutionDao.saveStepExecutions(Collection)
public void updateStepExecution(StepExecution stepExecution)
StepExecutionDao
updateStepExecution
in interface StepExecutionDao
stepExecution
- StepExecution
instance to be updated.public StepExecution getStepExecution(JobExecution jobExecution, java.lang.Long stepExecutionId)
StepExecutionDao
StepExecution
from its id.getStepExecution
in interface StepExecutionDao
jobExecution
- the parent JobExecution
stepExecutionId
- the step execution idStepExecution
public void addStepExecutions(JobExecution jobExecution)
StepExecutionDao
StepExecution
for the parent JobExecution
.addStepExecutions
in interface StepExecutionDao
jobExecution
- the parent job execution