sascha@1203: package de.intevation.flys.model; sascha@1203: sascha@1203: import java.io.Serializable; sascha@1203: sascha@1203: import java.math.BigDecimal; sascha@1203: sascha@1203: import java.util.List; sascha@1203: sascha@1203: import javax.persistence.Entity; sascha@1203: import javax.persistence.Id; sascha@1203: import javax.persistence.Table; sascha@1203: import javax.persistence.GeneratedValue; sascha@1203: import javax.persistence.Column; sascha@1203: import javax.persistence.SequenceGenerator; sascha@1203: import javax.persistence.GenerationType; sascha@1203: import javax.persistence.OneToOne; sascha@1203: import javax.persistence.OneToMany; sascha@1203: import javax.persistence.JoinColumn; sascha@1203: sascha@1203: @Entity sascha@1203: @Table(name = "cross_section_lines") sascha@1203: public class CrossSectionLine sascha@1203: implements Serializable sascha@1203: { sascha@1203: private Integer id; sascha@1203: private BigDecimal km; sascha@1203: private CrossSection crossSection; sascha@1203: sascha@1204: private List points; sascha@1204: sascha@1203: public CrossSectionLine() { sascha@1203: } sascha@1203: sascha@1204: public CrossSectionLine(CrossSection crossSection, BigDecimal km) { sascha@1204: this.crossSection = crossSection; sascha@1204: this.km = km; sascha@1204: } sascha@1204: sascha@1203: @Id sascha@1203: @SequenceGenerator( sascha@1203: name = "SEQUENCE_CROSS_SECTION_LINES_ID_SEQ", sascha@1203: sequenceName = "CROSS_SECTION_LINES_ID_SEQ", sascha@1203: allocationSize = 1) sascha@1203: @GeneratedValue( sascha@1203: strategy = GenerationType.SEQUENCE, sascha@1203: generator = "SEQUENCE_CROSS_SECTION_LINES_ID_SEQ") sascha@1203: @Column(name = "id") sascha@1203: public Integer getId() { sascha@1203: return id; sascha@1203: } sascha@1203: sascha@1203: public void setId(Integer id) { sascha@1203: this.id = id; sascha@1203: } sascha@1203: sascha@1203: @Column(name = "km") sascha@1203: public BigDecimal getKm() { sascha@1203: return km; sascha@1203: } sascha@1203: sascha@1203: public void setKm(BigDecimal km) { sascha@1203: this.km = km; sascha@1203: } sascha@1203: sascha@1203: @OneToOne sascha@1203: @JoinColumn(name = "cross_section_id") sascha@1203: public CrossSection getCrossSection() { sascha@1203: return crossSection; sascha@1203: } sascha@1203: sascha@1203: public void setCrossSection(CrossSection CrossSection) { sascha@1203: this.crossSection = crossSection; sascha@1203: } sascha@1203: sascha@1203: @OneToMany sascha@1203: @JoinColumn(name="cross_section_line_id") sascha@1203: public List getPoints() { sascha@1203: return points; sascha@1203: } sascha@1203: sascha@1203: public void setPoints(List points) { sascha@1203: this.points = points; sascha@1203: } sascha@1203: } sascha@1203: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :