comparison flys-backend/src/main/java/de/intevation/flys/model/BedHeightEpochValue.java @ 2810:04eeb45df27b

Implemented model classes and importer classes for bed height epochs. flys-backend/trunk@4222 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 12 Apr 2012 12:50:49 +0000
parents
children 1894e0471eac
comparison
equal deleted inserted replaced
2809:f283212966e8 2810:04eeb45df27b
1 package de.intevation.flys.model;
2
3 import java.io.Serializable;
4 import java.math.BigDecimal;
5
6 import javax.persistence.Entity;
7 import javax.persistence.Id;
8 import javax.persistence.Table;
9 import javax.persistence.GeneratedValue;
10 import javax.persistence.Column;
11 import javax.persistence.SequenceGenerator;
12 import javax.persistence.GenerationType;
13 import javax.persistence.JoinColumn;
14 import javax.persistence.OneToOne;
15
16 import org.apache.log4j.Logger;
17
18
19 @Entity
20 @Table(name = "bed_height_epoch_values")
21 public class BedHeightEpochValue
22 implements Serializable
23 {
24 private static Logger logger =
25 Logger.getLogger(BedHeightEpochValue.class);
26
27 private Integer id;
28
29 private BedHeightEpoch bedHeight;
30
31 private BigDecimal station;
32 private BigDecimal height;
33
34
35 public BedHeightEpochValue() {
36 }
37
38 public BedHeightEpochValue(
39 BedHeightEpoch bedHeight,
40 BigDecimal station,
41 BigDecimal height
42 ) {
43 this.bedHeight = bedHeight;
44 this.station = station;
45 this.height = height;
46 }
47
48 @Id
49 @SequenceGenerator(
50 name = "SEQUENCE_BED_EPOCH_VALUE_ID_SEQ",
51 sequenceName = "BED_EPOCH_VALUES_ID_SEQ",
52 allocationSize = 1)
53 @GeneratedValue(
54 strategy = GenerationType.SEQUENCE,
55 generator = "SEQUENCE_BED_EPOCH_VALUE_ID_SEQ")
56 @Column(name = "id")
57 public Integer getId() {
58 return id;
59 }
60
61 public void setId(Integer id) {
62 this.id = id;
63 }
64
65 @OneToOne
66 @JoinColumn(name = "bed_height_epoch_id" )
67 public BedHeightEpoch getBedHeight() {
68 return bedHeight;
69 }
70
71 public void setBedHeight(BedHeightEpoch bedHeight) {
72 this.bedHeight = bedHeight;
73 }
74
75 @Column(name = "station")
76 public BigDecimal getStation() {
77 return station;
78 }
79
80 public void setStation(BigDecimal station) {
81 this.station = station;
82 }
83
84 @Column(name = "height")
85 public BigDecimal getHeight() {
86 return height;
87 }
88
89 public void setHeight(BigDecimal height) {
90 this.height = height;
91 }
92 }
93 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org