comparison backend/src/main/java/org/dive4elements/river/model/SedimentLoadLS.java @ 8072:5f28aa1be795

SCHEMA CHANGE: rename database tables from yield to load_ls according to respective classes.
author Tom Gottfried <tom@intevation.de>
date Wed, 06 Aug 2014 19:17:12 +0200
parents bde5f5ec7c72
children 3ae11daff343
comparison
equal deleted inserted replaced
8071:6e6506ec0ae0 8072:5f28aa1be795
24 import javax.persistence.OneToOne; 24 import javax.persistence.OneToOne;
25 25
26 26
27 /** SedimentLoadLS of a certain Fraction with possibly many values. */ 27 /** SedimentLoadLS of a certain Fraction with possibly many values. */
28 @Entity 28 @Entity
29 @Table(name = "sediment_yield") 29 @Table(name = "sediment_load_ls")
30 public class SedimentLoadLS 30 public class SedimentLoadLS
31 implements Serializable 31 implements Serializable
32 { 32 {
33 private Integer id; 33 private Integer id;
34 34
87 this.description = description; 87 this.description = description;
88 } 88 }
89 89
90 @Id 90 @Id
91 @SequenceGenerator( 91 @SequenceGenerator(
92 name = "SEQUENCE_SEDIMENT_YIELD_ID_SEQ", 92 name = "SEQUENCE_SEDIMENT_LOAD_LS_ID_SEQ",
93 sequenceName = "SEDIMENT_YIELD_ID_SEQ", 93 sequenceName = "SEDIMENT_LOAD_LS_ID_SEQ",
94 allocationSize = 1) 94 allocationSize = 1)
95 @GeneratedValue( 95 @GeneratedValue(
96 strategy = GenerationType.SEQUENCE, 96 strategy = GenerationType.SEQUENCE,
97 generator = "SEQUENCE_SEDIMENT_YIELD_ID_SEQ") 97 generator = "SEQUENCE_SEDIMENT_LOAD_LS_ID_SEQ")
98 @Column(name = "id") 98 @Column(name = "id")
99 public Integer getId() { 99 public Integer getId() {
100 return id; 100 return id;
101 } 101 }
102 102
172 public void setKind(Integer newKind) { 172 public void setKind(Integer newKind) {
173 this.kind = newKind; 173 this.kind = newKind;
174 } 174 }
175 175
176 @OneToMany 176 @OneToMany
177 @JoinColumn(name="sediment_yield_id") 177 @JoinColumn(name="sediment_load_ls_id")
178 public List<SedimentLoadLSValue> getSedimentLoadLSValues() { 178 public List<SedimentLoadLSValue> getSedimentLoadLSValues() {
179 return values; 179 return values;
180 } 180 }
181 181
182 public void setSedimentLoadLSValues(List<SedimentLoadLSValue> values) { 182 public void setSedimentLoadLSValues(List<SedimentLoadLSValue> values) {

http://dive4elements.wald.intevation.org