sascha@1210: package de.intevation.flys.model; sascha@1210: sascha@1210: import java.io.Serializable; 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.JoinColumn; sascha@1210: sascha@1210: @Entity sascha@1210: @Table(name = "hyk_flow_zones") sascha@1210: public class HYKFlowZone sascha@1210: implements Serializable sascha@1210: { sascha@1210: private Integer id; sascha@1210: private HYKFormation formation; sascha@1210: private HYKFlowZoneType type; sascha@1210: private BigDecimal a; sascha@1210: private BigDecimal b; sascha@1210: sascha@1210: public HYKFlowZone() { sascha@1210: } sascha@1210: sascha@1210: public HYKFlowZone( sascha@1210: HYKFormation formation, sascha@1210: HYKFlowZoneType type, sascha@1210: BigDecimal a, sascha@1210: BigDecimal b sascha@1210: ) { sascha@1210: this.formation = formation; sascha@1210: this.type = type; sascha@1210: this.a = a; sascha@1210: this.b = b; sascha@1210: } sascha@1210: sascha@1210: @Id sascha@1210: @SequenceGenerator( sascha@1210: name = "SEQUENCE_HYK_FLOW_ZONES_ID_SEQ", sascha@1210: sequenceName = "HYK_FLOW_ZONES_ID_SEQ", sascha@1210: allocationSize = 1) sascha@1210: @GeneratedValue( sascha@1210: strategy = GenerationType.SEQUENCE, sascha@1210: generator = "SEQUENCE_HYK_FLOW_ZONES_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: @OneToOne sascha@1210: @JoinColumn(name = "formation_id") sascha@1210: public HYKFormation getFormation() { sascha@1210: return formation; sascha@1210: } sascha@1210: sascha@1210: public void setFormation(HYKFormation formation) { sascha@1210: this.formation = formation; sascha@1210: } sascha@1210: sascha@1210: @OneToOne sascha@1210: @JoinColumn(name = "type_id") sascha@1210: public HYKFlowZoneType getType() { sascha@1210: return type; sascha@1210: } sascha@1210: sascha@1210: public void setType(HYKFlowZoneType type) { sascha@1210: this.type = type; sascha@1210: } sascha@1210: sascha@1210: @Column(name = "a") sascha@1210: public BigDecimal getA() { sascha@1210: return a; sascha@1210: } sascha@1210: sascha@1210: public void setA(BigDecimal a) { sascha@1210: this.a = a; sascha@1210: } sascha@1210: sascha@1210: @Column(name = "b") sascha@1210: public BigDecimal getB() { sascha@1210: return b; sascha@1210: } sascha@1210: sascha@1210: public void setB(BigDecimal b) { sascha@1210: this.b = b; sascha@1210: } sascha@1210: } sascha@1210: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :