comparison flys-backend/src/main/java/de/intevation/flys/model/SedimentDensityValue.java @ 3962:d609fd83310a

merged flys-backend
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:15:04 +0200
parents 8979f2294af9
children be9e28cff0c4
comparison
equal deleted inserted replaced
3938:c0cab28ba1ea 3962:d609fd83310a
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
17 @Entity
18 @Table(name = "sediment_density_values")
19 public class SedimentDensityValue implements Serializable {
20
21 private Integer id;
22
23 private SedimentDensity sedimentDensity;
24
25 private BigDecimal station;
26 private BigDecimal density;
27
28 private String description;
29
30
31 public SedimentDensityValue() {
32 }
33
34
35 public SedimentDensityValue(
36 SedimentDensity sedimentDensity,
37 BigDecimal station,
38 BigDecimal density,
39 String desc
40 ) {
41 this.sedimentDensity = sedimentDensity;
42 this.station = station;
43 this.density = density;
44 this.description = desc;
45 }
46
47 @Id
48 @SequenceGenerator(
49 name = "SEQUENCE_SEDIMENT_DENSITY_VALUES_ID_SEQ",
50 sequenceName = "SEDIMENT_DENSITY_VALUES_ID_SEQ",
51 allocationSize = 1)
52 @GeneratedValue(
53 strategy = GenerationType.SEQUENCE,
54 generator = "SEQUENCE_SEDIMENT_DENSITY_VALUES_ID_SEQ")
55 @Column(name = "id")
56 public Integer getId() {
57 return id;
58 }
59
60 public void setId(Integer id) {
61 this.id = id;
62 }
63
64 @OneToOne
65 @JoinColumn(name = "sediment_density_id")
66 public SedimentDensity getSedimentDensity() {
67 return sedimentDensity;
68 }
69
70 public void setSedimentDensity(SedimentDensity sedimentDensity) {
71 this.sedimentDensity = sedimentDensity;
72 }
73
74 @Column(name = "station")
75 public BigDecimal getStation() {
76 return station;
77 }
78
79 public void setStation(BigDecimal station) {
80 this.station = station;
81 }
82
83 @Column(name = "density")
84 public BigDecimal getDensity() {
85 return density;
86 }
87
88 public void setDensity(BigDecimal density) {
89 this.density = density;
90 }
91
92 @Column(name = "description")
93 public String getDescription() {
94 return description;
95 }
96
97 public void setDescription(String description) {
98 this.description = description;
99 }
100 }
101 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org