comparison flys-backend/src/main/java/de/intevation/flys/model/WstQRange.java @ 508:a9c7f6ec3a5a 2.3.1

merged flys-backend/2.3.1
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:12 +0200
parents 3169b559ca3c
children
comparison
equal deleted inserted replaced
462:ebf049a1eb53 508:a9c7f6ec3a5a
1 package de.intevation.flys.model;
2
3 import java.math.BigDecimal;
4
5 import java.io.Serializable;
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 = "wst_q_ranges")
19 public class WstQRange
20 implements Serializable
21 {
22 private Integer id;
23 private Range range;
24 private BigDecimal q;
25
26 public WstQRange() {
27 }
28
29 public WstQRange(Range range, BigDecimal q) {
30 this.range = range;
31 this.q = q;
32 }
33
34 @Id
35 @SequenceGenerator(
36 name = "SEQUENCE_WST_Q_RANGES_ID_SEQ",
37 sequenceName = "WST_Q_RANGES_ID_SEQ",
38 allocationSize = 1)
39 @GeneratedValue(
40 strategy = GenerationType.SEQUENCE,
41 generator = "SEQUENCE_WST_Q_RANGES_ID_SEQ")
42 @Column(name = "id")
43 public Integer getId() {
44 return id;
45 }
46
47 public void setId(Integer id) {
48 this.id = id;
49 }
50
51 @OneToOne
52 @JoinColumn(name = "range_id" )
53 public Range getRange() {
54 return range;
55 }
56
57 public void setRange(Range range) {
58 this.range = range;
59 }
60
61 @Column(name = "q") // FIXME: type mapping needed?!
62 public BigDecimal getQ() {
63 return q;
64 }
65
66 public void setQ(BigDecimal q) {
67 this.q = q;
68 }
69 }
70 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org