1 | package de.uka.ipd.sdq.sensorframework.dao.file.entities; |
2 | |
3 | import de.uka.ipd.sdq.sensorframework.dao.file.FileDAOFactory; |
4 | import de.uka.ipd.sdq.sensorframework.entities.Sensor; |
5 | import de.uka.ipd.sdq.sensorframework.entities.dao.IDAOFactory; |
6 | |
7 | /** |
8 | * @author Ihssane El-Oudghiri |
9 | */ |
10 | public abstract class SensorImpl extends AbstractFileEntity implements Sensor, SerializableEntity { |
11 | |
12 | /** |
13 | * For Serialization |
14 | */ |
15 | private static final long serialVersionUID = 1L; |
16 | |
17 | protected long sensorID; |
18 | |
19 | protected String sensorName; |
20 | |
21 | public SensorImpl(IDAOFactory factory) { |
22 | super(factory); |
23 | } |
24 | |
25 | public String getFileName() { |
26 | return FileDAOFactory.SENSOR_FILE_NAME_PREFIX + getSensorID(); |
27 | } |
28 | |
29 | public long getID() { |
30 | return this.sensorID; |
31 | } |
32 | |
33 | public long getSensorID() { |
34 | return sensorID; |
35 | } |
36 | |
37 | public String getSensorName() { |
38 | return sensorName; |
39 | } |
40 | |
41 | public void setSensorID(long sensorID) { |
42 | this.sensorID = sensorID; |
43 | } |
44 | |
45 | public void setSensorName(String sensorName) { |
46 | this.sensorName = sensorName; |
47 | } |
48 | } |