sascha@167: package de.intevation.flys.model;
sascha@167: 
sascha@167: import java.io.Serializable;
sascha@167: 
sascha@171: import javax.persistence.Entity;
sascha@171: import javax.persistence.Id;
sascha@171: import javax.persistence.Table;
sascha@171: import javax.persistence.GeneratedValue;
sascha@171: import javax.persistence.Column;
sascha@171: import javax.persistence.SequenceGenerator;
sascha@171: import javax.persistence.GenerationType;
sascha@174: import javax.persistence.OneToOne;
sascha@174: import javax.persistence.JoinColumn;
sascha@171: 
sascha@171: @Entity
sascha@171: @Table(name = "wst_column_q_ranges")
sascha@167: public class WstColumnQRange
sascha@167: implements   Serializable
sascha@167: {
sascha@171:     private Integer   id;
sascha@167:     private WstColumn wstColumn;
sascha@167:     private WstQRange wstQRange;
sascha@167: 
sascha@167:     public WstColumnQRange() {
sascha@167:     }
sascha@167: 
sascha@201:     public WstColumnQRange(
sascha@201:         WstColumn wstColumn,
sascha@201:         WstQRange wstQRange
sascha@201:     ) {
sascha@201:         this.wstColumn = wstColumn;
sascha@201:         this.wstQRange = wstQRange;
sascha@201:     }
sascha@201: 
sascha@171:     @Id
sascha@171:     @SequenceGenerator(
sascha@171:         name           = "SEQUENCE_WST_Q_RANGES_ID_SEQ",
sascha@171:         sequenceName   = "WST_Q_RANGES_ID_SEQ",
sascha@171:         allocationSize = 1)
sascha@171:     @GeneratedValue(
sascha@171:         strategy  = GenerationType.SEQUENCE,
sascha@171:         generator = "SEQUENCE_WST_Q_RANGES_ID_SEQ")
sascha@171:     @Column(name = "id")
sascha@171:     public Integer getId() {
sascha@171:         return id;
sascha@171:     }
sascha@171: 
sascha@168:     public void setId(Integer id) {
sascha@167:         this.id = id;
sascha@167:     }
sascha@167: 
sascha@174:     @OneToOne
sascha@174:     @JoinColumn(name = "wst_column_id" )
sascha@172:     public WstColumn getWstColumn() {
sascha@172:         return wstColumn;
sascha@172:     }
sascha@172: 
sascha@167:     public void setWstColumn(WstColumn wstColumn) {
sascha@167:         this.wstColumn = wstColumn;
sascha@167:     }
sascha@167: 
sascha@174:     @OneToOne
sascha@174:     @JoinColumn(name = "wst_q_range_id" )
sascha@172:     public WstQRange getWstQRange() {
sascha@172:         return wstQRange;
sascha@167:     }
sascha@167: 
sascha@167:     public void setWstQRange(WstQRange wstQRange) {
sascha@167:         this.wstQRange = wstQRange;
sascha@167:     }
sascha@167: }
sascha@167: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
sascha@167: