Class MongoStepExecutionDao
java.lang.Object
org.springframework.batch.core.repository.dao.MongoStepExecutionDao
- All Implemented Interfaces:
StepExecutionDao
- Since:
- 5.2.0
- Author:
- Mahmoud Ben Hassine
-
Constructor Summary
ConstructorsConstructorDescriptionMongoStepExecutionDao(org.springframework.data.mongodb.core.MongoOperations mongoOperations) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStepExecutions(JobExecution jobExecution) Retrieve all theStepExecutionfor the parentJobExecution.longcountStepExecutions(JobInstance jobInstance, String stepName) Counts all theStepExecutionfor a given step name.getLastStepExecution(JobInstance jobInstance, String stepName) Retrieve the lastStepExecutionfor a givenJobInstanceordered by creation time and then id.getStepExecution(JobExecution jobExecution, Long stepExecutionId) Retrieve aStepExecutionfrom its id.voidsaveStepExecution(StepExecution stepExecution) Save the given StepExecution.voidsaveStepExecutions(Collection<StepExecution> stepExecutions) Save the given collection of StepExecution as a batch.voidsetStepExecutionIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer stepExecutionIncrementer) voidupdateStepExecution(StepExecution stepExecution) Update the given StepExecutionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.batch.core.repository.dao.StepExecutionDao
deleteStepExecution
-
Constructor Details
-
MongoStepExecutionDao
public MongoStepExecutionDao(org.springframework.data.mongodb.core.MongoOperations mongoOperations)
-
-
Method Details
-
setStepExecutionIncrementer
public void setStepExecutionIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer stepExecutionIncrementer) -
saveStepExecution
Description copied from interface:StepExecutionDaoSave the given StepExecution.Preconditions: Id must be null.
Postconditions: Id will be set to a unique Long.
- Specified by:
saveStepExecutionin interfaceStepExecutionDao- Parameters:
stepExecution-StepExecutioninstance to be saved.
-
saveStepExecutions
Description copied from interface:StepExecutionDaoSave the given collection of StepExecution as a batch.Preconditions: StepExecution Id must be null.
Postconditions: StepExecution Id will be set to a unique Long.
- Specified by:
saveStepExecutionsin interfaceStepExecutionDao- Parameters:
stepExecutions- a collection ofJobExecutioninstances to be saved.
-
updateStepExecution
Description copied from interface:StepExecutionDaoUpdate the given StepExecutionPreconditions: Id must not be null.
- Specified by:
updateStepExecutionin interfaceStepExecutionDao- Parameters:
stepExecution-StepExecutioninstance to be updated.
-
getStepExecution
Description copied from interface:StepExecutionDaoRetrieve aStepExecutionfrom its id.- Specified by:
getStepExecutionin interfaceStepExecutionDao- Parameters:
jobExecution- the parentJobExecutionstepExecutionId- the step execution id- Returns:
- a
StepExecution
-
getLastStepExecution
Description copied from interface:StepExecutionDaoRetrieve the lastStepExecutionfor a givenJobInstanceordered by creation time and then id.- Specified by:
getLastStepExecutionin interfaceStepExecutionDao- Parameters:
jobInstance- the parentJobInstancestepName- the name of the step- Returns:
- a
StepExecution
-
addStepExecutions
Description copied from interface:StepExecutionDaoRetrieve all theStepExecutionfor the parentJobExecution.- Specified by:
addStepExecutionsin interfaceStepExecutionDao- Parameters:
jobExecution- the parent job execution
-
countStepExecutions
Description copied from interface:StepExecutionDaoCounts all theStepExecutionfor a given step name.- Specified by:
countStepExecutionsin interfaceStepExecutionDao- Parameters:
jobInstance- the parentJobInstancestepName- the name of the step- Returns:
- the count of
StepExecutions for a given step
-