1 | package de.uka.ipd.sdq.sensorframework.dao.file; |
2 | |
3 | import java.io.Serializable; |
4 | |
5 | /** TODO document me |
6 | * @author Ihssane El-Oudghiri |
7 | * @author Steffen Becker |
8 | |
9 | */ |
10 | public class IDGenerator implements Serializable { |
11 | |
12 | private static final long serialVersionUID = -4845947012172760482L; |
13 | |
14 | private long nextExperimentID = 0; |
15 | private long nextExperimentRunID = 0; |
16 | private long nextMeasurementID = 0; |
17 | private long nextSensorID = 0; |
18 | private long nextStateID = 0; |
19 | |
20 | public long getNextExperimentID() { |
21 | return nextExperimentID++; |
22 | } |
23 | |
24 | public long getNextExperimentRunID() { |
25 | return nextExperimentRunID++; |
26 | } |
27 | |
28 | public long getNextMeasurementID() { |
29 | return nextMeasurementID++; |
30 | } |
31 | |
32 | public long getNextSensorID() { |
33 | return nextSensorID++; |
34 | } |
35 | |
36 | public long getNextStateID() { |
37 | return nextStateID++; |
38 | } |
39 | } |