1 package org.lsst.ccs.localdb.statusdb.model;
2
3 import java.io.Serializable;
4
5 import javax.persistence.Column;
6 import javax.persistence.Entity;
7 import javax.persistence.GeneratedValue;
8 import javax.persistence.GenerationType;
9 import javax.persistence.Id;
10 import javax.persistence.ManyToOne;
11 import javax.persistence.Table;
12
13 import org.hibernate.annotations.Index;
14
15 @Entity
16 @Table(name = "rawdata")
17 @org.hibernate.annotations.Table(appliesTo = "rawdata", indexes = { @Index(name = "ts", columnNames = {
18 "descr_id", "tstampmills" }) })
19
20
21 public class RawData implements Serializable {
22
23 private static final long serialVersionUID = 5996448023570084719L;
24 private long id;
25 private DataDesc descr;
26 private long tstamp;
27 private Double doubleData;
28 private String stringData;
29
30
31
32
33 @Id
34 @GeneratedValue(strategy = GenerationType.AUTO)
35 public long getId() {
36 return id;
37 }
38
39
40
41
42
43 public void setId(long id) {
44 this.id = id;
45 }
46
47
48
49
50 @ManyToOne
51 public DataDesc getDescr() {
52 return descr;
53 }
54
55
56
57
58
59 public void setDescr(DataDesc descr) {
60 this.descr = descr;
61 }
62
63
64
65
66 @Column(name = "tstampmills")
67 public long getTstamp() {
68 return tstamp;
69 }
70
71
72
73
74
75 public void setTstamp(long tstamp) {
76 this.tstamp = tstamp;
77 }
78
79
80
81
82 public Double getDoubleData() {
83 return doubleData;
84 }
85
86
87
88
89
90 public void setDoubleData(Double doubleData) {
91 this.doubleData = doubleData;
92 }
93
94
95
96
97 public String getStringData() {
98 return stringData;
99 }
100
101
102
103
104
105 public void setStringData(String stringData) {
106 this.stringData = stringData;
107 }
108
109
110
111 }
112
113
114