comparison backend/src/main/java/org/dive4elements/river/model/SQRelation.java @ 8641:c851d1ea543a

SCHEMA CHANGE: Remove unnecessary direct relation of sq_relation with rivers.
author Tom Gottfried <tom@intevation.de>
date Fri, 27 Mar 2015 17:42:27 +0100
parents 4c3ccf2b0304
children
comparison
equal deleted inserted replaced
8640:0d15ebafbd0e 8641:c851d1ea543a
28 @Table(name = "sq_relation") 28 @Table(name = "sq_relation")
29 public class SQRelation implements Serializable { 29 public class SQRelation implements Serializable {
30 30
31 private Integer id; 31 private Integer id;
32 32
33 private River river;
34
35 private TimeInterval timeInterval; 33 private TimeInterval timeInterval;
36 34
37 private String description; 35 private String description;
38 36
39 private List<SQRelationValue> values; 37 private List<SQRelationValue> values;
41 39
42 protected SQRelation() { 40 protected SQRelation() {
43 } 41 }
44 42
45 43
46 public SQRelation(River river, TimeInterval timeInterval, String desc) { 44 public SQRelation(TimeInterval timeInterval, String desc) {
47 this.river = river;
48 this.timeInterval = timeInterval; 45 this.timeInterval = timeInterval;
49 this.description = desc; 46 this.description = desc;
50 } 47 }
51 48
52 49
63 return id; 60 return id;
64 } 61 }
65 62
66 public void setId(Integer id) { 63 public void setId(Integer id) {
67 this.id = id; 64 this.id = id;
68 }
69
70
71 @OneToOne
72 @JoinColumn(name = "river_id")
73 public River getRiver() {
74 return river;
75 }
76
77 public void setRiver(River river) {
78 this.river = river;
79 } 65 }
80 66
81 67
82 @Column(name = "description") 68 @Column(name = "description")
83 public String getDescription() { 69 public String getDescription() {

http://dive4elements.wald.intevation.org