ingo@3321: package de.intevation.flys.model; ingo@3321: ingo@3321: import java.io.Serializable; ingo@3321: ingo@3321: import javax.persistence.Entity; ingo@3321: import javax.persistence.Id; ingo@3321: import javax.persistence.Table; ingo@3321: import javax.persistence.GeneratedValue; ingo@3329: import javax.persistence.JoinColumn; ingo@3321: import javax.persistence.Column; ingo@3321: import javax.persistence.SequenceGenerator; ingo@3321: import javax.persistence.OneToOne; ingo@3321: import javax.persistence.GenerationType; ingo@3321: ingo@3321: ingo@3321: @Entity ingo@3321: @Table(name = "sq_relation_value") ingo@3321: public class SQRelationValue implements Serializable { ingo@3321: ingo@3321: private Integer id; ingo@3321: ingo@3321: private SQRelation sqRelation; ingo@3321: ingo@3321: private String parameter; ingo@3321: private String fraction; ingo@3321: private String function; ingo@3321: ingo@3321: private double km; ingo@3321: private double a; ingo@3321: private double b; ingo@3321: ingo@3321: ingo@3329: protected SQRelationValue() { ingo@3329: } ingo@3329: ingo@3329: ingo@3329: public SQRelationValue( ingo@3329: SQRelation sqRelation, ingo@3329: String parameter, ingo@3329: String fraction, ingo@3329: String function, ingo@3329: double km, ingo@3329: double a, ingo@3329: double b ingo@3329: ) { ingo@3329: this.sqRelation = sqRelation; ingo@3329: this.parameter = parameter; ingo@3329: this.fraction = fraction; ingo@3329: this.function = function; ingo@3329: this.km = km; ingo@3329: this.a = a; ingo@3329: this.b = b; ingo@3329: } ingo@3329: ingo@3329: ingo@3321: @Id ingo@3321: @SequenceGenerator( ingo@3321: name = "SEQUENCE_SQ_VALUE_ID_SEQ", ingo@3321: sequenceName = "SQ_RELATION_VALUES_ID_SEQ", ingo@3321: allocationSize = 1) ingo@3321: @GeneratedValue( ingo@3321: strategy = GenerationType.SEQUENCE, ingo@3321: generator = "SEQUENCE_SQ_VALUE_ID_SEQ") ingo@3321: @Column(name = "id") ingo@3321: public Integer getId() { ingo@3321: return id; ingo@3321: } ingo@3321: ingo@3321: public void setId(Integer id) { ingo@3321: this.id = id; ingo@3321: } ingo@3321: ingo@3321: ingo@3321: @OneToOne ingo@3329: @JoinColumn(name = "sq_relation_id") ingo@3329: public SQRelation getSqRelation() { ingo@3321: return sqRelation; ingo@3321: } ingo@3321: ingo@3329: public void setSqRelation(SQRelation sqRelation) { ingo@3321: this.sqRelation = sqRelation; ingo@3321: } ingo@3321: ingo@3321: ingo@3321: @Column(name = "parameter") ingo@3321: public String getParameter() { ingo@3321: return parameter; ingo@3321: } ingo@3321: ingo@3321: public void setParameter(String parameter) { ingo@3321: this.parameter = parameter; ingo@3321: } ingo@3321: ingo@3321: ingo@3321: @Column(name = "fraction") ingo@3321: public String getFraction() { ingo@3321: return fraction; ingo@3321: } ingo@3321: ingo@3321: public void setFraction(String fraction) { ingo@3321: this.fraction = fraction; ingo@3321: } ingo@3321: ingo@3321: ingo@3321: @Column(name = "function") ingo@3321: public String getFunction() { ingo@3321: return function; ingo@3321: } ingo@3321: ingo@3321: public void setFunction(String function) { ingo@3321: this.function = function; ingo@3321: } ingo@3321: ingo@3321: ingo@3321: @Column(name = "km") ingo@3321: public double getKm() { ingo@3321: return km; ingo@3321: } ingo@3321: ingo@3321: public void setKm(double km) { ingo@3321: this.km = km; ingo@3321: } ingo@3321: ingo@3321: ingo@3321: @Column(name = "a") ingo@3321: public double getA() { ingo@3321: return a; ingo@3321: } ingo@3321: ingo@3321: public void setA(double a) { ingo@3321: this.a = a; ingo@3321: } ingo@3321: ingo@3321: ingo@3321: @Column(name = "b") ingo@3321: public double getB() { ingo@3321: return b; ingo@3321: } ingo@3321: ingo@3321: public void setB(double b) { ingo@3321: this.b = b; ingo@3321: } ingo@3321: } ingo@3321: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :