EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.sensorframework.dao.memory]

COVERAGE SUMMARY FOR SOURCE FILE [MemoryDAOFactory.java]

nameclass, %method, %block, %line, %
MemoryDAOFactory.java100% (1/1)60%  (9/15)84%  (72/86)72%  (21/29)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class MemoryDAOFactory100% (1/1)60%  (9/15)84%  (72/86)72%  (21/29)
MemoryDAOFactory (String): void 0%   (0/1)0%   (0/4)0%   (0/2)
getDescription (): String 0%   (0/1)0%   (0/2)0%   (0/1)
getName (): String 0%   (0/1)0%   (0/2)0%   (0/1)
reload (): void 0%   (0/1)0%   (0/1)0%   (0/1)
setID (long): void 0%   (0/1)0%   (0/4)0%   (0/2)
store (): void 0%   (0/1)0%   (0/1)0%   (0/1)
MemoryDAOFactory (long): void 100% (1/1)100% (6/6)100% (3/3)
createExperimentDAO (): IExperimentDAO 100% (1/1)100% (12/12)100% (3/3)
createExperimentRunDAO (): IExperimentRunDAO 100% (1/1)100% (12/12)100% (3/3)
createMeasurementDAO (): IMeasurementDAO 100% (1/1)100% (12/12)100% (3/3)
createSensorDAO (): ISensorDAO 100% (1/1)100% (12/12)100% (3/3)
createStateDAO (): IStateDAO 100% (1/1)100% (12/12)100% (3/3)
finalizeAndClose (): void 100% (1/1)100% (1/1)100% (1/1)
getID (): long 100% (1/1)100% (3/3)100% (1/1)
getPersistendInfo (): String 100% (1/1)100% (2/2)100% (1/1)

1/**
2 * 
3 */
4package de.uka.ipd.sdq.sensorframework.dao.memory;
5 
6import de.uka.ipd.sdq.sensorframework.entities.dao.IDAOFactory;
7import de.uka.ipd.sdq.sensorframework.entities.dao.IExperimentDAO;
8import de.uka.ipd.sdq.sensorframework.entities.dao.IExperimentRunDAO;
9import de.uka.ipd.sdq.sensorframework.entities.dao.IMeasurementDAO;
10import de.uka.ipd.sdq.sensorframework.entities.dao.ISensorDAO;
11import de.uka.ipd.sdq.sensorframework.entities.dao.IStateDAO;
12 
13/**
14 * @author Steffen Becker
15 *
16 */
17public class MemoryDAOFactory implements IDAOFactory {
18 
19        private IExperimentDAO experimentDAO;
20        private IExperimentRunDAO experimentRunDAO;
21        private IMeasurementDAO measurementDAO;
22        private ISensorDAO sensorDAO;
23        private IStateDAO stateDAO;
24        private long id;
25 
26        public MemoryDAOFactory(long id) {
27                this.id = id;
28        }
29        
30        public MemoryDAOFactory(String config) {
31                this(IDAOFactory.ID_NOT_SET);
32        }
33        
34        /* (non-Javadoc)
35         * @see de.uka.ipd.sdq.sensorfactory.entities.dao.IDAOFactory#createExperimentDAO()
36         */
37        public IExperimentDAO createExperimentDAO() {
38                if (this.experimentDAO == null)
39                        this.experimentDAO = new MemoryExperimentDAO(this); 
40                return this.experimentDAO;
41        }
42 
43        /* (non-Javadoc)
44         * @see de.uka.ipd.sdq.sensorfactory.entities.dao.IDAOFactory#createExperimentRunDAO()
45         */
46        public IExperimentRunDAO createExperimentRunDAO() {
47                if (this.experimentRunDAO == null)
48                        this.experimentRunDAO = new MemoryExperimentRunDAO(this); 
49                return this.experimentRunDAO;
50        }
51 
52        /* (non-Javadoc)
53         * @see de.uka.ipd.sdq.sensorfactory.entities.dao.IDAOFactory#createMeasurementDAO()
54         */
55        public IMeasurementDAO createMeasurementDAO() {
56                if (this.measurementDAO == null)
57                        this.measurementDAO = new MemoryMeasurementDAO(this); 
58                return this.measurementDAO;
59        }
60 
61        /* (non-Javadoc)
62         * @see de.uka.ipd.sdq.sensorfactory.entities.dao.IDAOFactory#createSensorDAO()
63         */
64        public ISensorDAO createSensorDAO() {
65                if (this.sensorDAO == null)
66                        this.sensorDAO = new MemorySensorDAO(this);
67                return this.sensorDAO;
68        }
69 
70        /* (non-Javadoc)
71         * @see de.uka.ipd.sdq.sensorfactory.entities.dao.IDAOFactory#createStateDAO()
72         */
73        public IStateDAO createStateDAO() {
74                if (this.stateDAO == null)
75                        this.stateDAO = new MemoryStateDAO(this); 
76                return this.stateDAO;
77        }
78 
79        public String getDescription() {
80                return "A datasource stored in memory. Changes are lost, when unsafed";
81        }
82 
83        public String getName() {
84                return "Memory Datasource";
85        }
86 
87        public void finalizeAndClose() {
88        }
89 
90        public long getID() {
91                return this.id;
92        }
93 
94        public void setID(long i) {
95                this.id = i;
96        }
97 
98        public String getPersistendInfo() {
99                return "";
100        }
101 
102        public void reload() {
103                // Nothing to do here
104        }
105 
106        public void store() {
107                // Nothing to do here
108        }
109}

[all classes][de.uka.ipd.sdq.sensorframework.dao.memory]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov