aheinecke@5061: package de.intevation.flys.model; aheinecke@5061: aheinecke@5061: import java.io.Serializable; aheinecke@5061: aheinecke@5061: import javax.persistence.Column; aheinecke@5061: import javax.persistence.Entity; aheinecke@5061: import javax.persistence.Id; aheinecke@5061: import javax.persistence.JoinColumn; aheinecke@5061: import javax.persistence.OneToOne; aheinecke@5061: import javax.persistence.Table; aheinecke@5061: aheinecke@5061: import org.hibernate.Session; aheinecke@5061: import org.hibernate.Query; aheinecke@5064: import org.hibernate.annotations.Type; aheinecke@5061: aheinecke@5061: import de.intevation.flys.backend.SessionHolder; aheinecke@5064: import de.intevation.flys.model.HWSKind; aheinecke@5064: aheinecke@5064: import com.vividsolutions.jts.geom.Geometry; aheinecke@5061: aheinecke@5061: @Entity aheinecke@5061: @Table(name = "hws_lines") aheinecke@5061: public class HWSLine implements Serializable { aheinecke@5061: aheinecke@5061: private Integer id; aheinecke@5061: aheinecke@5061: private Integer ogr_fid; aheinecke@5061: private HWSKind kind; aheinecke@5061: private FedState fedState; aheinecke@5061: private River river; aheinecke@5061: private Integer offical; aheinecke@5061: private Integer shore_side; aheinecke@5061: private String name; aheinecke@5061: private String path; aheinecke@5061: private String agency; aheinecke@5061: private String range; aheinecke@5061: private String source; aheinecke@5061: private String status_date; aheinecke@5061: private String description; aheinecke@5061: private Geometry geom; aheinecke@5061: aheinecke@5061: @Id aheinecke@5061: @Column(name = "id") aheinecke@5061: public Integer getId() { aheinecke@5061: return id; aheinecke@5061: } aheinecke@5061: aheinecke@5061: public void setId(Integer id) { aheinecke@5061: this.id = id; aheinecke@5061: } aheinecke@5061: aheinecke@5061: @Column(name = "geom") aheinecke@5061: @Type(type = "org.hibernatespatial.GeometryUserType") aheinecke@5061: public Geometry getGeom() { aheinecke@5061: return geom; aheinecke@5061: } aheinecke@5061: aheinecke@5061: aheinecke@5061: public void setGeom(Geometry geom) { aheinecke@5061: this.geom = geom; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get ogr_fid. aheinecke@5061: * aheinecke@5061: * @return ogr_fid as Integer. aheinecke@5061: */ aheinecke@5061: @Column(name = "ogr_fid") aheinecke@5061: public Integer getOgrFid() aheinecke@5061: { aheinecke@5061: return ogr_fid; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set ogr_fid. aheinecke@5061: * aheinecke@5061: * @param ogr_fid the value to set. aheinecke@5061: */ aheinecke@5061: public void setOgrFid(Integer ogr_fid) aheinecke@5061: { aheinecke@5061: this.ogr_fid = ogr_fid; aheinecke@5061: } aheinecke@5061: aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get offical. aheinecke@5061: * aheinecke@5061: * @return offical as Integer. aheinecke@5061: */ aheinecke@5061: @Column(name = "offical") aheinecke@5061: public Integer getOffical() aheinecke@5061: { aheinecke@5061: return offical; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set offical. aheinecke@5061: * aheinecke@5061: * @param offical the value to set. aheinecke@5061: */ aheinecke@5061: public void setOffical(Integer offical) aheinecke@5061: { aheinecke@5061: this.offical = offical; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get shore_side. aheinecke@5061: * aheinecke@5061: * @return shore_side as Integer. aheinecke@5061: */ aheinecke@5061: @Column(name = "shore_side") aheinecke@5061: public Integer getShoreSide() aheinecke@5061: { aheinecke@5061: return shore_side; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set shore_side. aheinecke@5061: * aheinecke@5061: * @param shore_side the value to set. aheinecke@5061: */ aheinecke@5061: public void setShoreSide(Integer shore_side) aheinecke@5061: { aheinecke@5061: this.shore_side = shore_side; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get name. aheinecke@5061: * aheinecke@5061: * @return name as String. aheinecke@5061: */ aheinecke@5061: @Column(name = "name") aheinecke@5061: public String getName() aheinecke@5061: { aheinecke@5061: return name; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set name. aheinecke@5061: * aheinecke@5061: * @param name the value to set. aheinecke@5061: */ aheinecke@5061: public void setName(String name) aheinecke@5061: { aheinecke@5061: this.name = name; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get path. aheinecke@5061: * aheinecke@5061: * @return path as String. aheinecke@5061: */ aheinecke@5061: @Column(name = "path") aheinecke@5061: public String getPath() aheinecke@5061: { aheinecke@5061: return path; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set path. aheinecke@5061: * aheinecke@5061: * @param path the value to set. aheinecke@5061: */ aheinecke@5061: public void setPath(String path) aheinecke@5061: { aheinecke@5061: this.path = path; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get agency. aheinecke@5061: * aheinecke@5061: * @return agency as String. aheinecke@5061: */ aheinecke@5061: @Column(name = "agency") aheinecke@5061: public String getAgency() aheinecke@5061: { aheinecke@5061: return agency; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set agency. aheinecke@5061: * aheinecke@5061: * @param agency the value to set. aheinecke@5061: */ aheinecke@5061: public void setAgency(String agency) aheinecke@5061: { aheinecke@5061: this.agency = agency; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get range. aheinecke@5061: * aheinecke@5061: * @return range as String. aheinecke@5061: */ aheinecke@5061: @Column(name = "range") aheinecke@5061: public String getRange() aheinecke@5061: { aheinecke@5061: return range; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set range. aheinecke@5061: * aheinecke@5061: * @param range the value to set. aheinecke@5061: */ aheinecke@5061: public void setRange(String range) aheinecke@5061: { aheinecke@5061: this.range = range; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get source. aheinecke@5061: * aheinecke@5061: * @return source as String. aheinecke@5061: */ aheinecke@5061: @Column(name = "source") aheinecke@5061: public String getSource() aheinecke@5061: { aheinecke@5061: return source; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set source. aheinecke@5061: * aheinecke@5061: * @param source the value to set. aheinecke@5061: */ aheinecke@5061: public void setSource(String source) aheinecke@5061: { aheinecke@5061: this.source = source; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get status_date. aheinecke@5061: * aheinecke@5061: * @return status_date as String. aheinecke@5061: */ aheinecke@5061: @Column(name = "status_date") aheinecke@5061: public String getStatusDate() aheinecke@5061: { aheinecke@5061: return status_date; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set status_date. aheinecke@5061: * aheinecke@5061: * @param status_date the value to set. aheinecke@5061: */ aheinecke@5061: public void setStatusDate(String status_date) aheinecke@5061: { aheinecke@5061: this.status_date = status_date; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get description. aheinecke@5061: * aheinecke@5061: * @return description as String. aheinecke@5061: */ aheinecke@5061: @Column(name = "description") aheinecke@5061: public String getDescription() aheinecke@5061: { aheinecke@5061: return description; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set description. aheinecke@5061: * aheinecke@5061: * @param description the value to set. aheinecke@5061: */ aheinecke@5061: public void setDescription(String description) aheinecke@5061: { aheinecke@5061: this.description = description; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get kind. aheinecke@5061: * aheinecke@5061: * @return kind as HWSKind. aheinecke@5061: */ aheinecke@5061: @OneToOne aheinecke@5061: @JoinColumn(name = "kind_id") aheinecke@5061: public HWSKind getKind() aheinecke@5061: { aheinecke@5061: return kind; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set kind. aheinecke@5061: * aheinecke@5061: * @param kind the value to set. aheinecke@5061: */ aheinecke@5061: public void setKind(HWSKind kind) aheinecke@5061: { aheinecke@5061: this.kind = kind; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get fedState. aheinecke@5061: * aheinecke@5061: * @return fedState as FedState. aheinecke@5061: */ aheinecke@5061: @OneToOne aheinecke@5061: @JoinColumn(name = "fed_state_id") aheinecke@5061: public FedState getFedState() aheinecke@5061: { aheinecke@5061: return fedState; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set fedState. aheinecke@5061: * aheinecke@5061: * @param fedState the value to set. aheinecke@5061: */ aheinecke@5061: public void setFedState(FedState fedState) aheinecke@5061: { aheinecke@5061: this.fedState = fedState; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Get river. aheinecke@5061: * aheinecke@5061: * @return river as River. aheinecke@5061: */ aheinecke@5061: @OneToOne aheinecke@5061: @JoinColumn(name = "river_id") aheinecke@5061: public River getRiver() aheinecke@5061: { aheinecke@5061: return river; aheinecke@5061: } aheinecke@5061: aheinecke@5061: /** aheinecke@5061: * Set river. aheinecke@5061: * aheinecke@5061: * @param river the value to set. aheinecke@5061: */ aheinecke@5061: public void setRiver(River river) aheinecke@5061: { aheinecke@5061: this.river = river; aheinecke@5061: } aheinecke@5061: }