EMMA Coverage Report (generated Fri Aug 21 15:59:46 BST 2009)
[all classes][org.springframework.batch.core.repository.support]

COVERAGE SUMMARY FOR SOURCE FILE [MapJobRepositoryFactoryBean.java]

nameclass, %method, %block, %line, %
MapJobRepositoryFactoryBean.java100% (1/1)100% (6/6)100% (24/24)100% (10/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class MapJobRepositoryFactoryBean100% (1/1)100% (6/6)100% (24/24)100% (10/10)
MapJobRepositoryFactoryBean (): void 100% (1/1)100% (3/3)100% (1/1)
clear (): void 100% (1/1)100% (5/5)100% (5/5)
createExecutionContextDao (): ExecutionContextDao 100% (1/1)100% (4/4)100% (1/1)
createJobExecutionDao (): JobExecutionDao 100% (1/1)100% (4/4)100% (1/1)
createJobInstanceDao (): JobInstanceDao 100% (1/1)100% (4/4)100% (1/1)
createStepExecutionDao (): StepExecutionDao 100% (1/1)100% (4/4)100% (1/1)

1/*
2 * Copyright 2006-2007 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 
17package org.springframework.batch.core.repository.support;
18 
19import org.springframework.batch.core.repository.dao.ExecutionContextDao;
20import org.springframework.batch.core.repository.dao.JobExecutionDao;
21import org.springframework.batch.core.repository.dao.JobInstanceDao;
22import org.springframework.batch.core.repository.dao.MapExecutionContextDao;
23import org.springframework.batch.core.repository.dao.MapJobExecutionDao;
24import org.springframework.batch.core.repository.dao.MapJobInstanceDao;
25import org.springframework.batch.core.repository.dao.MapStepExecutionDao;
26import org.springframework.batch.core.repository.dao.StepExecutionDao;
27import org.springframework.batch.support.transaction.ResourcelessTransactionManager;
28import org.springframework.beans.factory.FactoryBean;
29 
30/**
31 * A {@link FactoryBean} that automates the creation of a
32 * {@link SimpleJobRepository} using non-persistent in-memory DAO
33 * implementations. This repository is only really intended for use in testing
34 * and rapid prototyping. In such settings you might find that
35 * {@link ResourcelessTransactionManager} is useful (as long as your business
36 * logic does not use a relational database).  Not suited for use in
37 * multi-threaded jobs with splits, although it should be safe to use in a
38 * multi-threaded step.
39 * 
40 * @author Robert Kasanicky
41 */
42public class MapJobRepositoryFactoryBean extends AbstractJobRepositoryFactoryBean {
43 
44        /**
45         * Convenience method to clear all the map daos globally, removing all
46         * entities.
47         */
48        public static void clear() {
49                MapJobInstanceDao.clear();
50                MapJobExecutionDao.clear();
51                MapStepExecutionDao.clear();
52                MapExecutionContextDao.clear();
53        }
54 
55        @Override
56        protected JobExecutionDao createJobExecutionDao() throws Exception {
57                return new MapJobExecutionDao();
58        }
59 
60        @Override
61        protected JobInstanceDao createJobInstanceDao() throws Exception {
62                return new MapJobInstanceDao();
63        }
64 
65        @Override
66        protected StepExecutionDao createStepExecutionDao() throws Exception {
67                return new MapStepExecutionDao();
68        }
69 
70        @Override
71        protected ExecutionContextDao createExecutionContextDao() throws Exception {
72                return new MapExecutionContextDao();
73        }
74 
75}

[all classes][org.springframework.batch.core.repository.support]
EMMA 2.0.5312 (C) Vladimir Roubtsov