sascha@1194: package de.intevation.flys.model; sascha@1194: sascha@1194: import java.io.Serializable; sascha@1194: sascha@1194: import javax.persistence.Entity; sascha@1194: import javax.persistence.Id; sascha@1194: import javax.persistence.Table; sascha@1194: import javax.persistence.GeneratedValue; sascha@1194: import javax.persistence.Column; sascha@1194: import javax.persistence.SequenceGenerator; sascha@1194: import javax.persistence.GenerationType; sascha@1194: import javax.persistence.OneToOne; sascha@1194: import javax.persistence.JoinColumn; sascha@1194: sascha@1194: @Entity sascha@1194: @Table(name = "cross_section_points") sascha@1194: public class CrossSectionPoint sascha@1194: implements Serializable sascha@1194: { sascha@1203: private Integer id; sascha@1203: private CrossSectionLine crossSectionLine; sascha@1203: private Integer colPos; sascha@2860: private Double x; sascha@2860: private Double y; sascha@1194: sascha@1194: public CrossSectionPoint() { sascha@1194: } sascha@1194: sascha@1204: public CrossSectionPoint( sascha@1204: CrossSectionLine crossSectionLine, sascha@1204: Integer colPos, sascha@2860: Double x, sascha@2860: Double y sascha@1204: ) { sascha@1204: this.crossSectionLine = crossSectionLine; sascha@1204: this.colPos = colPos; sascha@1204: this.x = x; sascha@1204: this.y = y; sascha@1204: } sascha@1204: sascha@1194: @Id sascha@1194: @SequenceGenerator( sascha@1194: name = "SEQUENCE_CROSS_SECTION_POINTS_ID_SEQ", sascha@1194: sequenceName = "CROSS_SECTION_POINTS_ID_SEQ", sascha@1194: allocationSize = 1) sascha@1194: @GeneratedValue( sascha@1194: strategy = GenerationType.SEQUENCE, sascha@1194: generator = "SEQUENCE_CROSS_SECTION_POINTS_ID_SEQ") sascha@1194: @Column(name = "id") sascha@1194: public Integer getId() { sascha@1194: return id; sascha@1194: } sascha@1194: sascha@1194: public void setId(Integer id) { sascha@1194: this.id = id; sascha@1194: } sascha@1194: sascha@1194: @OneToOne sascha@1203: @JoinColumn(name = "cross_section_line_id") sascha@1203: public CrossSectionLine getCrossSectionLine() { sascha@1203: return crossSectionLine; sascha@1194: } sascha@1194: sascha@1203: public void setCrossSectionLine(CrossSectionLine crossSectionLine) { sascha@1203: this.crossSectionLine = crossSectionLine; sascha@1194: } sascha@1194: sascha@1194: @Column(name = "col_pos") sascha@1194: public Integer getColPos() { sascha@1194: return colPos; sascha@1194: } sascha@1194: sascha@1194: public void setColPos(Integer colPos) { sascha@1194: this.colPos = colPos; sascha@1194: } sascha@1195: sascha@1195: @Column(name = "x") sascha@2860: public Double getX() { sascha@1195: return x; sascha@1195: } sascha@1195: sascha@2860: public void setX(Double x) { sascha@1195: this.x = x; sascha@1195: } sascha@1195: sascha@1195: @Column(name = "y") sascha@2860: public Double getY() { sascha@1195: return y; sascha@1195: } sascha@1195: sascha@2860: public void setY(Double y) { sascha@1195: this.y = y; sascha@1195: } sascha@1194: } sascha@1194: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :