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: import org.hibernate.annotations.DynamicInsert; tom@1097: tom@1097: tom@1097: /** tom@1097: * The persistent class for the messung database table. tom@1097: * tom@1097: */ tom@1097: // The DynamicInsert Annotation has the effect, that the persisted object still tom@1097: // has all the "null"-values. There is no reloading after the persistence tom@1097: // process! tom@1097: @Entity tom@1097: @DynamicInsert(true) tom@1097: public class Messung 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 fertig; tom@1097: tom@1097: private Boolean geplant; tom@1097: tom@1097: @Column(name="id_alt") tom@1097: private Integer idAlt; tom@1097: raimund@1302: @Column(name="letzte_aenderung", insertable=false) tom@1097: private Timestamp letzteAenderung; tom@1097: tom@1097: private Integer messdauer; tom@1097: tom@1097: private Timestamp messzeitpunkt; tom@1097: tom@1097: @Column(name="mmt_id") tom@1097: private String mmtId; tom@1097: tom@1097: @Column(name="nebenproben_nr") tom@1097: private String nebenprobenNr; tom@1097: tom@1097: @Column(name="probe_id") tom@1097: private Integer probeId; tom@1097: tom@1097: @OneToOne tom@1097: @JoinColumn(name="probe_id", insertable=false, updatable=false) tom@1097: private Probe probe; tom@1097: tom@1097: private Integer status; tom@1097: raimund@1135: @Column(name="tree_modified", insertable=false, updatable=false) tom@1097: private Timestamp treeModified; tom@1097: tom@1097: @Transient tom@1097: private Boolean statusEdit; tom@1097: tom@1097: @Transient tom@1097: private Timestamp parentModified; tom@1097: tom@1097: @Transient tom@1097: private boolean owner; tom@1097: tom@1097: @Transient tom@1097: private boolean readonly; tom@1097: tom@1097: public Messung() { 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 getFertig() { tom@1097: return this.fertig; tom@1097: } tom@1097: tom@1097: public void setFertig(Boolean fertig) { tom@1097: this.fertig = fertig; tom@1097: } tom@1097: tom@1097: public Boolean getGeplant() { tom@1097: return this.geplant; tom@1097: } tom@1097: tom@1097: public void setGeplant(Boolean geplant) { tom@1097: this.geplant = geplant; tom@1097: } tom@1097: tom@1097: public Integer getIdAlt() { tom@1097: return this.idAlt; tom@1097: } tom@1097: tom@1097: public void setIdAlt(Integer idAlt) { tom@1097: this.idAlt = idAlt; 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 getMessdauer() { tom@1097: return this.messdauer; tom@1097: } tom@1097: tom@1097: public void setMessdauer(Integer messdauer) { tom@1097: this.messdauer = messdauer; tom@1097: } tom@1097: tom@1097: public Timestamp getMesszeitpunkt() { tom@1097: return this.messzeitpunkt; tom@1097: } tom@1097: tom@1097: public void setMesszeitpunkt(Timestamp messzeitpunkt) { tom@1097: this.messzeitpunkt = messzeitpunkt; tom@1097: } tom@1097: tom@1097: public String getMmtId() { tom@1097: return this.mmtId; tom@1097: } tom@1097: tom@1097: public void setMmtId(String mmtId) { tom@1097: this.mmtId = mmtId; tom@1097: } tom@1097: tom@1097: public String getNebenprobenNr() { tom@1097: return this.nebenprobenNr; tom@1097: } tom@1097: tom@1097: public void setNebenprobenNr(String nebenprobenNr) { tom@1097: this.nebenprobenNr = nebenprobenNr; tom@1097: } tom@1097: tom@1097: public Integer getProbeId() { tom@1097: return this.probeId; tom@1097: } tom@1097: tom@1097: public void setProbeId(Integer probeId) { tom@1097: this.probeId = probeId; tom@1097: } tom@1097: tom@1097: public Integer getStatus() { tom@1097: return this.status; tom@1097: } tom@1097: tom@1097: public void setStatus(Integer status) { tom@1097: this.status = status; 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 statusEdit tom@1097: */ tom@1097: public Boolean getStatusEdit() { tom@1097: return statusEdit; tom@1097: } tom@1097: tom@1097: /** tom@1097: * @param statusEdit the statusEdit to set tom@1097: */ tom@1097: public void setStatusEdit(Boolean statusEdit) { tom@1097: this.statusEdit = statusEdit; tom@1097: } tom@1097: tom@1097: /** tom@1097: * @return the parentModified tom@1097: */ tom@1097: public Timestamp getParentModified() { tom@1097: if (this.parentModified == null && this.probe != null) { tom@1097: return this.probe.getTreeModified(); tom@1097: } tom@1097: return parentModified; tom@1097: } tom@1097: tom@1097: /** tom@1097: * @param parentModified the parentModified to set tom@1097: */ tom@1097: public void setParentModified(Timestamp parentModified) { tom@1097: this.parentModified = parentModified; 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: }