1 package uk.co.concise.maven.hdc.model;
2
3 import java.util.Date;
4
5
6 /***
7 * A point for a label.
8 *
9 * @author martenssonb
10 *
11 * @hibernate.class
12 * table = "POINTS"
13 */
14 public class Point {
15
16 private long id;
17 private Date time;
18 private double value;
19 private Label label;
20
21 /***
22 * The time for this point.
23 * @return Returns the time.
24 *
25 * @hibernate.property type="timestamp"
26 * not-null="true"
27 */
28 public Date getTime() {
29 return time;
30 }
31 /***
32 * The time for this point.
33 * @param time The time to set.
34 */
35 public void setTime(Date time) {
36 this.time = time;
37 }
38 /***
39 * The value for this point.
40 * @return Returns the value.
41 *
42 * @hibernate.property
43 */
44 public double getValue() {
45 return value;
46 }
47 /***
48 * The value for this point.
49 * @param value The value to set.
50 */
51 public void setValue(double value) {
52 this.value = value;
53 }
54
55 /***
56 * Returns the unique id.
57 *
58 * @hibernate.id
59 * column = "id"
60 * generator-class = "native"
61 * unsaved-value = "0"
62 *
63 * @return Returns the id.
64 */
65 public long getId() {
66 return id;
67 }
68
69 /***
70 * Sets the unique id. For hibernate.
71 * @param id
72 * The id to set.
73 */
74 private void setId(long id) {
75 this.id = id;
76 }
77
78 /***
79 * @return Returns the label.
80 *
81 * @hibernate.many-to-one column="label_id"
82 *
83 */
84 public Label getLabel() {
85 return label;
86 }
87 /***
88 * @param label The label to set.
89 */
90 public void setLabel(Label label) {
91 this.label = label;
92 }
93 }