sascha@1194: package de.intevation.flys.model; sascha@1194: sascha@1195: import java.math.BigDecimal; sascha@1195: 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@1203: private BigDecimal x; sascha@1203: private BigDecimal y; sascha@1194: sascha@1194: public CrossSectionPoint() { sascha@1194: } sascha@1194: sascha@1204: public CrossSectionPoint( sascha@1204: CrossSectionLine crossSectionLine, sascha@1204: Integer colPos, sascha@1204: BigDecimal x, sascha@1204: BigDecimal 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@1195: public BigDecimal getX() { sascha@1195: return x; sascha@1195: } sascha@1195: sascha@1195: public void setX(BigDecimal x) { sascha@1195: this.x = x; sascha@1195: } sascha@1195: sascha@1195: @Column(name = "y") sascha@1195: public BigDecimal getY() { sascha@1195: return y; sascha@1195: } sascha@1195: sascha@1195: public void setY(BigDecimal 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 :