Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/model/PorosityValue.java @ 7840:02711de579cc
Added model, parser and importer for porosities.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 30 Apr 2014 14:11:29 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
7839:3f6b9fae1637 | 7840:02711de579cc |
---|---|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde | |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU AGPL (>=v3) | |
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
6 * documentation coming with Dive4Elements River for details. | |
7 */ | |
8 | |
9 package org.dive4elements.river.model; | |
10 | |
11 import java.io.Serializable; | |
12 import java.math.BigDecimal; | |
13 | |
14 import javax.persistence.Entity; | |
15 import javax.persistence.Id; | |
16 import javax.persistence.Table; | |
17 import javax.persistence.GeneratedValue; | |
18 import javax.persistence.Column; | |
19 import javax.persistence.SequenceGenerator; | |
20 import javax.persistence.GenerationType; | |
21 import javax.persistence.JoinColumn; | |
22 import javax.persistence.OneToOne; | |
23 | |
24 | |
25 @Entity | |
26 @Table(name = "porosity_values") | |
27 public class PorosityValue implements Serializable { | |
28 | |
29 private Integer id; | |
30 | |
31 private Porosity porosity; | |
32 | |
33 private BigDecimal station; | |
34 private BigDecimal shoreOffset; | |
35 private BigDecimal porosityValue; | |
36 | |
37 private String description; | |
38 | |
39 | |
40 public PorosityValue() { | |
41 } | |
42 | |
43 | |
44 public PorosityValue( | |
45 Porosity porosity, | |
46 BigDecimal station, | |
47 BigDecimal shoreOffset, | |
48 BigDecimal porosityValue, | |
49 String desc | |
50 ) { | |
51 this.porosity = porosity; | |
52 this.station = station; | |
53 this.shoreOffset = shoreOffset; | |
54 this.porosityValue = porosityValue; | |
55 this.description = desc; | |
56 } | |
57 | |
58 @Id | |
59 @SequenceGenerator( | |
60 name = "SEQUENCE_POROSITY_VALUES_ID_SEQ", | |
61 sequenceName = "POROSITY_VALUES_ID_SEQ", | |
62 allocationSize = 1) | |
63 @GeneratedValue( | |
64 strategy = GenerationType.SEQUENCE, | |
65 generator = "SEQUENCE_POROSITY_VALUES_ID_SEQ") | |
66 @Column(name = "id") | |
67 public Integer getId() { | |
68 return id; | |
69 } | |
70 | |
71 public void setId(Integer id) { | |
72 this.id = id; | |
73 } | |
74 | |
75 @OneToOne | |
76 @JoinColumn(name = "porosity_id") | |
77 public Porosity getPorosity() { | |
78 return porosity; | |
79 } | |
80 | |
81 public void setPorosity(Porosity porosity) { | |
82 this.porosity = porosity; | |
83 } | |
84 | |
85 @Column(name = "station") | |
86 public BigDecimal getStation() { | |
87 return station; | |
88 } | |
89 | |
90 public void setStation(BigDecimal station) { | |
91 this.station = station; | |
92 } | |
93 | |
94 @Column(name = "shore_offset") | |
95 public BigDecimal getShoreOffset() { | |
96 return shoreOffset; | |
97 } | |
98 | |
99 public void setShoreOffset(BigDecimal shoreOffset) { | |
100 this.shoreOffset = shoreOffset; | |
101 } | |
102 | |
103 @Column(name = "porosity") | |
104 public BigDecimal getPorosityValue() { | |
105 return porosityValue; | |
106 } | |
107 | |
108 public void setPorosityValue(BigDecimal porosityValue) { | |
109 this.porosityValue = porosityValue; | |
110 } | |
111 | |
112 @Column(name = "description") | |
113 public String getDescription() { | |
114 return description; | |
115 } | |
116 | |
117 public void setDescription(String description) { | |
118 this.description = description; | |
119 } | |
120 } | |
121 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |