Mercurial > lada > lada-server
changeset 754:9d34aca4fb07
Added "parentModified" attribute to status protocol.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 02 Nov 2015 09:58:50 +0100 |
parents | 5f6037a281fe |
children | 6b4764c19ced |
files | src/main/java/de/intevation/lada/model/land/LStatusProtokoll.java |
diffstat | 1 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/land/LStatusProtokoll.java Fri Oct 30 15:08:08 2015 +0100 +++ b/src/main/java/de/intevation/lada/model/land/LStatusProtokoll.java Mon Nov 02 09:58:50 2015 +0100 @@ -7,8 +7,13 @@ */ package de.intevation.lada.model.land; +import java.sql.Timestamp; + import javax.persistence.Entity; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; import javax.persistence.Table; +import javax.persistence.Transient; import de.intevation.lada.model.StatusProtokoll; @@ -19,4 +24,22 @@ @Table(name="status_protokoll") public class LStatusProtokoll extends StatusProtokoll { private static final long serialVersionUID = 1L; + + @OneToOne + @JoinColumn(name="messungs_id", insertable=false, updatable=false) + private LMessung messung; + + @Transient + private Timestamp parentModified; + + public Timestamp getParentModified() { + if (this.parentModified == null && this.messung != null) { + return this.messung.getTreeModified(); + } + return this.parentModified; + } + + public void setParentModified(Timestamp parentModified) { + this.parentModified = parentModified; + } }