Mercurial > lada > lada-server
view src/main/java/de/intevation/lada/model/land/Ortszuordnung.java @ 1300:03670cc25357
Added hibernate model for audit trail.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 24 Feb 2017 14:28:42 +0100 |
parents | 6e393b614edf |
children | 1bf808b67403 |
line wrap: on
line source
package de.intevation.lada.model.land; import java.io.Serializable; import java.sql.Timestamp; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.Transient; /** * The persistent class for the ortszuordnung database table. * */ @Entity public class Ortszuordnung implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Integer id; @Column(name="letzte_aenderung") private Timestamp letzteAenderung; @Column(name="ort_id") private Integer ortId; @Column(name="ortszuordnung_typ") private String ortszuordnungTyp; private String ortszusatztext; @Column(name="probe_id") private Integer probeId; @Column(name="tree_modified", insertable=false, updatable=false) private Timestamp treeModified; @OneToOne @JoinColumn(name="probe_id", insertable=false, updatable=false) private Probe probe; @Transient private boolean owner; @Transient private boolean readonly; @Transient private Timestamp parentModified; public Ortszuordnung() { } public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } public Timestamp getLetzteAenderung() { return this.letzteAenderung; } public void setLetzteAenderung(Timestamp letzteAenderung) { this.letzteAenderung = letzteAenderung; } public Integer getOrtId() { return this.ortId; } public void setOrtId(Integer ortId) { this.ortId = ortId; } public String getOrtszuordnungTyp() { return this.ortszuordnungTyp; } public void setOrtszuordnungTyp(String ortszuordnungTyp) { this.ortszuordnungTyp = ortszuordnungTyp; } public String getOrtszusatztext() { return this.ortszusatztext; } public void setOrtszusatztext(String ortszusatztext) { this.ortszusatztext = ortszusatztext; } public Integer getProbeId() { return this.probeId; } public void setProbeId(Integer probeId) { this.probeId = probeId; } public Timestamp getTreeModified() { return this.treeModified; } public void setTreeModified(Timestamp treeModified) { this.treeModified = treeModified; } /** * @return the owner */ public boolean isOwner() { return owner; } /** * @param owner the owner to set */ public void setOwner(boolean owner) { this.owner = owner; } /** * @return the readonly */ public boolean isReadonly() { return readonly; } /** * @param readonly the readonly to set */ public void setReadonly(boolean readonly) { this.readonly = readonly; } public Timestamp getParentModified() { if (this.parentModified == null && this.probe != null) { return this.probe.getTreeModified(); } return this.parentModified; } public void setParentModified(Timestamp parentModified) { this.parentModified = parentModified; } }