tom@1097: package de.intevation.lada.model.land; tom@1097: tom@1097: import java.io.Serializable; tom@1097: import java.sql.Timestamp; tom@1097: tom@1097: import javax.persistence.Column; tom@1097: import javax.persistence.Entity; tom@1097: import javax.persistence.GeneratedValue; tom@1097: import javax.persistence.GenerationType; tom@1097: import javax.persistence.Id; tom@1097: import javax.persistence.JoinColumn; tom@1097: import javax.persistence.OneToOne; tom@1097: import javax.persistence.Transient; tom@1097: tom@1097: tom@1097: /** tom@1097: * The persistent class for the messwert database table. tom@1097: * tom@1097: */ tom@1097: @Entity tom@1097: public class Messwert implements Serializable { tom@1097: private static final long serialVersionUID = 1L; tom@1097: tom@1097: @Id tom@1097: @GeneratedValue(strategy=GenerationType.IDENTITY) tom@1097: private Integer id; tom@1097: tom@1097: private Boolean grenzwertueberschreitung; tom@1097: raimund@1302: @Column(name="letzte_aenderung", insertable=false) tom@1097: private Timestamp letzteAenderung; tom@1097: tom@1097: @Column(name="meh_id") tom@1097: private Integer mehId; tom@1097: tom@1097: private Float messfehler; tom@1097: tom@1097: @Column(name="messgroesse_id") tom@1097: private Integer messgroesseId; tom@1097: tom@1097: @Column(name="messungs_id") tom@1097: private Integer messungsId; tom@1097: tom@1097: private Double messwert; tom@1097: tom@1097: @Column(name="messwert_nwg") tom@1097: private String messwertNwg; tom@1097: tom@1097: @Column(name="nwg_zu_messwert") tom@1097: private Double nwgZuMesswert; tom@1097: raimund@1135: @Column(name="tree_modified", insertable=false, updatable=false) tom@1097: private Timestamp treeModified; tom@1097: tom@1097: @OneToOne tom@1097: @JoinColumn(name="messungs_id", insertable=false, updatable=false) tom@1097: private Messung messung; tom@1097: tom@1097: @Transient tom@1097: private boolean owner; tom@1097: tom@1097: @Transient tom@1097: private boolean readonly; tom@1097: tom@1097: @Transient tom@1097: private Timestamp parentModified; tom@1097: tom@1097: public Messwert() { tom@1097: } tom@1097: tom@1097: public Integer getId() { tom@1097: return this.id; tom@1097: } tom@1097: tom@1097: public void setId(Integer id) { tom@1097: this.id = id; tom@1097: } tom@1097: tom@1097: public Boolean getGrenzwertueberschreitung() { tom@1097: return this.grenzwertueberschreitung; tom@1097: } tom@1097: tom@1097: public void setGrenzwertueberschreitung(Boolean grenzwertueberschreitung) { tom@1097: this.grenzwertueberschreitung = grenzwertueberschreitung; tom@1097: } tom@1097: tom@1097: public Timestamp getLetzteAenderung() { tom@1097: return this.letzteAenderung; tom@1097: } tom@1097: tom@1097: public void setLetzteAenderung(Timestamp letzteAenderung) { tom@1097: this.letzteAenderung = letzteAenderung; tom@1097: } tom@1097: tom@1097: public Integer getMehId() { tom@1097: return this.mehId; tom@1097: } tom@1097: tom@1097: public void setMehId(Integer mehId) { tom@1097: this.mehId = mehId; tom@1097: } tom@1097: tom@1097: public Float getMessfehler() { tom@1097: return this.messfehler; tom@1097: } tom@1097: tom@1097: public void setMessfehler(Float messfehler) { tom@1097: this.messfehler = messfehler; tom@1097: } tom@1097: tom@1097: public Integer getMessgroesseId() { tom@1097: return this.messgroesseId; tom@1097: } tom@1097: tom@1097: public void setMessgroesseId(Integer messgroesseId) { tom@1097: this.messgroesseId = messgroesseId; tom@1097: } tom@1097: tom@1097: public Integer getMessungsId() { tom@1097: return this.messungsId; tom@1097: } tom@1097: tom@1097: public void setMessungsId(Integer messungsId) { tom@1097: this.messungsId = messungsId; tom@1097: } tom@1097: tom@1097: public Double getMesswert() { tom@1097: return this.messwert; tom@1097: } tom@1097: tom@1097: public void setMesswert(Double messwert) { tom@1097: this.messwert = messwert; tom@1097: } tom@1097: tom@1097: public String getMesswertNwg() { tom@1097: return this.messwertNwg; tom@1097: } tom@1097: tom@1097: public void setMesswertNwg(String messwertNwg) { tom@1097: this.messwertNwg = messwertNwg; tom@1097: } tom@1097: tom@1097: public Double getNwgZuMesswert() { tom@1097: return this.nwgZuMesswert; tom@1097: } tom@1097: tom@1097: public void setNwgZuMesswert(Double nwgZuMesswert) { tom@1097: this.nwgZuMesswert = nwgZuMesswert; tom@1097: } tom@1097: tom@1097: public Timestamp getTreeModified() { tom@1097: return this.treeModified; tom@1097: } tom@1097: tom@1097: public void setTreeModified(Timestamp treeModified) { tom@1097: this.treeModified = treeModified; tom@1097: } tom@1097: tom@1097: /** tom@1097: * @return the owner tom@1097: */ tom@1097: public boolean isOwner() { tom@1097: return owner; tom@1097: } tom@1097: tom@1097: /** tom@1097: * @param owner the owner to set tom@1097: */ tom@1097: public void setOwner(boolean owner) { tom@1097: this.owner = owner; tom@1097: } tom@1097: tom@1097: /** tom@1097: * @return the readonly tom@1097: */ tom@1097: public boolean isReadonly() { tom@1097: return readonly; tom@1097: } tom@1097: tom@1097: /** tom@1097: * @param readonly the readonly to set tom@1097: */ tom@1097: public void setReadonly(boolean readonly) { tom@1097: this.readonly = readonly; tom@1097: } tom@1097: tom@1097: public Timestamp getParentModified() { tom@1097: if (this.parentModified == null && this.messung != null) { tom@1097: return this.messung.getTreeModified(); tom@1097: } tom@1097: return this.parentModified; tom@1097: } tom@1097: tom@1097: public void setParentModified(Timestamp parentModified) { tom@1097: this.parentModified = parentModified; tom@1097: } tom@1097: }