1 | package org.springframework.batch.core.repository.support; |
2 | |
3 | import org.springframework.batch.core.repository.dao.JobExecutionDao; |
4 | import org.springframework.batch.core.repository.dao.JobInstanceDao; |
5 | import org.springframework.batch.core.repository.dao.MapJobExecutionDao; |
6 | import org.springframework.batch.core.repository.dao.MapJobInstanceDao; |
7 | import org.springframework.batch.core.repository.dao.MapStepExecutionDao; |
8 | import org.springframework.batch.core.repository.dao.StepExecutionDao; |
9 | import org.springframework.beans.factory.FactoryBean; |
10 | |
11 | /** |
12 | * A {@link FactoryBean} that automates the creation of a |
13 | * {@link SimpleJobRepository} using non-persistent in-memory DAO |
14 | * implementations. |
15 | * |
16 | * @author Robert Kasanicky |
17 | */ |
18 | public class MapJobRepositoryFactoryBean extends AbstractJobRepositoryFactoryBean { |
19 | |
20 | protected JobExecutionDao createJobExecutionDao() throws Exception { |
21 | return new MapJobExecutionDao(); |
22 | } |
23 | |
24 | protected JobInstanceDao createJobInstanceDao() throws Exception { |
25 | return new MapJobInstanceDao(); |
26 | } |
27 | |
28 | protected StepExecutionDao createStepExecutionDao() throws Exception { |
29 | return new MapStepExecutionDao(); |
30 | } |
31 | |
32 | } |