comparison backend/src/main/java/org/dive4elements/river/model/HYKFlowZone.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-backend/src/main/java/org/dive4elements/river/model/HYKFlowZone.java@18619c1e7c2a
children 4dd33b86dc61
comparison
equal deleted inserted replaced
5837:d9901a08d0a6 5838:5aa05a7a34b7
1 package org.dive4elements.river.model;
2
3 import java.io.Serializable;
4
5 import java.math.BigDecimal;
6
7 import javax.persistence.Entity;
8 import javax.persistence.Id;
9 import javax.persistence.Table;
10 import javax.persistence.GeneratedValue;
11 import javax.persistence.Column;
12 import javax.persistence.SequenceGenerator;
13 import javax.persistence.GenerationType;
14 import javax.persistence.OneToOne;
15 import javax.persistence.JoinColumn;
16
17 @Entity
18 @Table(name = "hyk_flow_zones")
19 public class HYKFlowZone
20 implements Serializable
21 {
22 private Integer id;
23 private HYKFormation formation;
24 private HYKFlowZoneType type;
25 private BigDecimal a;
26 private BigDecimal b;
27
28 public HYKFlowZone() {
29 }
30
31 public HYKFlowZone(
32 HYKFormation formation,
33 HYKFlowZoneType type,
34 BigDecimal a,
35 BigDecimal b
36 ) {
37 this.formation = formation;
38 this.type = type;
39 this.a = a;
40 this.b = b;
41 }
42
43 @Id
44 @SequenceGenerator(
45 name = "SEQUENCE_HYK_FLOW_ZONES_ID_SEQ",
46 sequenceName = "HYK_FLOW_ZONES_ID_SEQ",
47 allocationSize = 1)
48 @GeneratedValue(
49 strategy = GenerationType.SEQUENCE,
50 generator = "SEQUENCE_HYK_FLOW_ZONES_ID_SEQ")
51 @Column(name = "id")
52 public Integer getId() {
53 return id;
54 }
55
56 public void setId(Integer id) {
57 this.id = id;
58 }
59
60 @OneToOne
61 @JoinColumn(name = "formation_id")
62 public HYKFormation getFormation() {
63 return formation;
64 }
65
66 public void setFormation(HYKFormation formation) {
67 this.formation = formation;
68 }
69
70 @OneToOne
71 @JoinColumn(name = "type_id")
72 public HYKFlowZoneType getType() {
73 return type;
74 }
75
76 public void setType(HYKFlowZoneType type) {
77 this.type = type;
78 }
79
80 @Column(name = "a")
81 public BigDecimal getA() {
82 return a;
83 }
84
85 public void setA(BigDecimal a) {
86 this.a = a;
87 }
88
89 @Column(name = "b")
90 public BigDecimal getB() {
91 return b;
92 }
93
94 public void setB(BigDecimal b) {
95 this.b = b;
96 }
97 }
98 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org