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 ortszuordnung database table. tom@1097: * tom@1097: */ tom@1097: @Entity tom@1097: public class Ortszuordnung 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: raimund@1302: @Column(name="letzte_aenderung", insertable=false) tom@1097: private Timestamp letzteAenderung; tom@1097: tom@1097: @Column(name="ort_id") tom@1215: private Integer ortId; tom@1097: tom@1097: @Column(name="ortszuordnung_typ") tom@1097: private String ortszuordnungTyp; tom@1097: tom@1097: private String ortszusatztext; tom@1097: tom@1097: @Column(name="probe_id") tom@1097: private Integer probeId; 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="probe_id", insertable=false, updatable=false) tom@1097: private Probe probe; 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 Ortszuordnung() { 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 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@1215: public Integer getOrtId() { tom@1097: return this.ortId; tom@1097: } tom@1097: tom@1215: public void setOrtId(Integer ortId) { tom@1097: this.ortId = ortId; tom@1097: } tom@1097: tom@1097: public String getOrtszuordnungTyp() { tom@1097: return this.ortszuordnungTyp; tom@1097: } tom@1097: tom@1097: public void setOrtszuordnungTyp(String ortszuordnungTyp) { tom@1097: this.ortszuordnungTyp = ortszuordnungTyp; tom@1097: } tom@1097: tom@1097: public String getOrtszusatztext() { tom@1097: return this.ortszusatztext; tom@1097: } tom@1097: tom@1097: public void setOrtszusatztext(String ortszusatztext) { tom@1097: this.ortszusatztext = ortszusatztext; 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 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.probe != null) { tom@1097: return this.probe.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: }