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.JoinColumn; sascha@174: import javax.persistence.OneToOne; sascha@171: sascha@171: @Entity sascha@171: @Table(name = "wsts") sascha@167: public class Wst sascha@167: implements Serializable sascha@167: { sascha@171: private Integer id; sascha@171: private River river; sascha@171: private String description; sascha@167: sascha@167: public Wst() { sascha@167: } sascha@167: sascha@171: @Id sascha@171: @SequenceGenerator( sascha@171: name = "SEQUENCE_WSTS_ID_SEQ", sascha@171: sequenceName = "WSTS_ID_SEQ", sascha@171: allocationSize = 1) sascha@171: @GeneratedValue( sascha@171: strategy = GenerationType.SEQUENCE, sascha@171: generator = "SEQUENCE_WSTS_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 = "river_id" ) sascha@174: public River getRiver() { sascha@174: return river; sascha@174: } sascha@174: sascha@167: public void setRiver(River river) { sascha@167: this.river = river; sascha@167: } sascha@167: sascha@172: @Column(name = "description") sascha@172: public String getDescription() { sascha@172: return description; sascha@172: } sascha@172: sascha@167: public void setDescription(String description) { sascha@167: this.description = description; sascha@167: } sascha@167: } sascha@167: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :