Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/flys/model/CrossSectionLine.java @ 1235:47ce1fab8464
Added a static function that returns all CrossSectionTracks of a specific river.
flys-backend/trunk@2611 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 30 Aug 2011 15:14:59 +0000 |
parents | 22858e7cca79 |
children | 3efc3942b765 |
line wrap: on
line source
package de.intevation.flys.model; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.GeneratedValue; import javax.persistence.Column; import javax.persistence.SequenceGenerator; import javax.persistence.GenerationType; import javax.persistence.OneToOne; import javax.persistence.OneToMany; import javax.persistence.JoinColumn; @Entity @Table(name = "cross_section_lines") public class CrossSectionLine implements Serializable { private Integer id; private BigDecimal km; private CrossSection crossSection; private List<CrossSectionPoint> points; public CrossSectionLine() { } public CrossSectionLine(CrossSection crossSection, BigDecimal km) { this.crossSection = crossSection; this.km = km; } @Id @SequenceGenerator( name = "SEQUENCE_CROSS_SECTION_LINES_ID_SEQ", sequenceName = "CROSS_SECTION_LINES_ID_SEQ", allocationSize = 1) @GeneratedValue( strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_CROSS_SECTION_LINES_ID_SEQ") @Column(name = "id") public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Column(name = "km") public BigDecimal getKm() { return km; } public void setKm(BigDecimal km) { this.km = km; } @OneToOne @JoinColumn(name = "cross_section_id") public CrossSection getCrossSection() { return crossSection; } public void setCrossSection(CrossSection CrossSection) { this.crossSection = crossSection; } @OneToMany @JoinColumn(name="cross_section_line_id") public List<CrossSectionPoint> getPoints() { return points; } public void setPoints(List<CrossSectionPoint> points) { this.points = points; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :