sascha@1210: package de.intevation.flys.model; sascha@1210: sascha@1210: import java.io.Serializable; sascha@1210: sascha@1210: import java.util.List; sascha@1210: sascha@1210: import java.math.BigDecimal; sascha@1210: sascha@1210: import javax.persistence.Entity; sascha@1210: import javax.persistence.Id; sascha@1210: import javax.persistence.Table; sascha@1210: import javax.persistence.GeneratedValue; sascha@1210: import javax.persistence.Column; sascha@1210: import javax.persistence.SequenceGenerator; sascha@1210: import javax.persistence.GenerationType; sascha@1210: import javax.persistence.OneToOne; sascha@1210: import javax.persistence.OneToMany; sascha@1210: import javax.persistence.OrderBy; sascha@1210: import javax.persistence.JoinColumn; sascha@1210: sascha@1210: @Entity sascha@1210: @Table(name = "hyk_formations") sascha@1210: public class HYKFormation sascha@1210: implements Serializable sascha@1210: { sascha@1210: private Integer id; sascha@1210: private Integer formationNum; sascha@1210: private HYKEntry entry; sascha@1210: private BigDecimal top; sascha@1210: private BigDecimal bottom; sascha@1214: private BigDecimal distanceVL; sascha@1214: private BigDecimal distanceHF; sascha@1214: private BigDecimal distanceVR; sascha@1210: sascha@1210: private List zones; sascha@1210: sascha@1210: public HYKFormation() { sascha@1210: } sascha@1210: sascha@1210: public HYKFormation( sascha@1210: Integer formationNum, sascha@1210: HYKEntry entry, sascha@1210: BigDecimal top, sascha@1214: BigDecimal bottom, sascha@1214: BigDecimal distanceVL, sascha@1214: BigDecimal distanceHF, sascha@1214: BigDecimal distanceVR sascha@1210: ) { sascha@1210: this.formationNum = formationNum; sascha@1210: this.entry = entry; sascha@1210: this.top = top; sascha@1210: this.bottom = bottom; sascha@1214: this.distanceVL = distanceVL; sascha@1214: this.distanceHF = distanceHF; sascha@1214: this.distanceVR = distanceVR; sascha@1210: } sascha@1210: sascha@1210: @Id sascha@1210: @SequenceGenerator( sascha@1210: name = "SEQUENCE_HYK_FORMATIONS_ID_SEQ", sascha@1210: sequenceName = "HYK_FORMATIONS_ID_SEQ", sascha@1210: allocationSize = 1) sascha@1210: @GeneratedValue( sascha@1210: strategy = GenerationType.SEQUENCE, sascha@1210: generator = "SEQUENCE_HYK_FORMATIONS_ID_SEQ") sascha@1210: @Column(name = "id") sascha@1210: public Integer getId() { sascha@1210: return id; sascha@1210: } sascha@1210: sascha@1210: public void setId(Integer id) { sascha@1210: this.id = id; sascha@1210: } sascha@1210: sascha@1210: @Column(name = "formation_num") sascha@1210: public Integer getFormationNum() { sascha@1210: return formationNum; sascha@1210: } sascha@1210: sascha@1210: public void setFormationNum(Integer formationNum) { sascha@1210: this.formationNum = formationNum; sascha@1210: } sascha@1210: sascha@1210: @OneToOne sascha@1210: @JoinColumn(name = "hyk_entry_id") sascha@1210: public HYKEntry getEntry() { sascha@1210: return entry; sascha@1210: } sascha@1210: sascha@1210: public void setEntry(HYKEntry entry) { sascha@1210: this.entry = entry; sascha@1210: } sascha@1210: sascha@1210: @Column(name = "top") sascha@1210: public BigDecimal getTop() { sascha@1210: return top; sascha@1210: } sascha@1210: sascha@1210: public void setTop(BigDecimal top) { sascha@1210: this.top = top; sascha@1210: } sascha@1210: sascha@1210: @Column(name = "bottom") sascha@1210: public BigDecimal getBottom() { sascha@1210: return bottom; sascha@1210: } sascha@1210: sascha@1210: public void setBottom(BigDecimal bottom) { sascha@1210: this.bottom = bottom; sascha@1210: } sascha@1210: sascha@1214: @Column(name = "distance_vl") sascha@1214: public BigDecimal getDistanceVL() { sascha@1214: return distanceVL; sascha@1214: } sascha@1214: sascha@1214: public void setDistanceVL(BigDecimal distanceVL) { sascha@1214: this.distanceVL = distanceVL; sascha@1214: } sascha@1214: sascha@1214: @Column(name = "distance_hf") sascha@1214: public BigDecimal getDistanceHF() { sascha@1214: return distanceHF; sascha@1214: } sascha@1214: sascha@1214: public void setDistanceHF(BigDecimal distanceHF) { sascha@1214: this.distanceHF = distanceHF; sascha@1214: } sascha@1214: sascha@1214: @Column(name = "distance_vr") sascha@1214: public BigDecimal getDistanceVR() { sascha@1214: return distanceVR; sascha@1214: } sascha@1214: sascha@1214: public void setDistanceVR(BigDecimal distanceVR) { sascha@1214: this.distanceVR = distanceVR; sascha@1214: } sascha@1214: sascha@1214: sascha@1210: @OneToMany sascha@1210: @OrderBy("a") sascha@1210: @JoinColumn(name="formation_id") sascha@1210: public List getZones() { sascha@1210: return zones; sascha@1210: } sascha@1210: sascha@1210: public void setZones(List zones) { sascha@1210: this.zones = zones; sascha@1210: } sascha@1210: } sascha@1210: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :