[Lada-commits] [PATCH 04 of 15] Updated model classes to have getter/setter for owner and readonly flags

Wald Commits scm-commit at wald.intevation.org
Mon Mar 23 17:59:56 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1427128936 -3600
# Node ID 4f83f2fc188a48e52d3c5250b32c742124006dc5
# Parent  b0d674240c2998c74e50986be8c3f050c4c1602a
Updated model classes to have getter/setter for owner and readonly flags.

diff -r b0d674240c29 -r 4f83f2fc188a src/main/java/de/intevation/lada/model/KommentarM.java
--- a/src/main/java/de/intevation/lada/model/KommentarM.java	Thu Mar 19 14:28:44 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/KommentarM.java	Mon Mar 23 17:42:16 2015 +0100
@@ -16,6 +16,7 @@
 import javax.persistence.Id;
 import javax.persistence.MappedSuperclass;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 
 
 /**
@@ -40,6 +41,12 @@
 
     private String text;
 
+    @Transient
+    private boolean owner;
+
+    @Transient
+    private boolean readonly;
+
     public KommentarM() {
     }
 
@@ -75,6 +82,22 @@
         this.text = text;
     }
 
+    public boolean isOwner() {
+        return owner;
+    }
+
+    public void setOwner(boolean owner) {
+        this.owner = owner;
+    }
+
+    public boolean isReadonly() {
+        return readonly;
+    }
+
+    public void setReadonly(boolean readonly) {
+        this.readonly = readonly;
+    }
+
     public Integer getMessungsId() {
         return this.messungsId;
     }
diff -r b0d674240c29 -r 4f83f2fc188a src/main/java/de/intevation/lada/model/KommentarP.java
--- a/src/main/java/de/intevation/lada/model/KommentarP.java	Thu Mar 19 14:28:44 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/KommentarP.java	Mon Mar 23 17:42:16 2015 +0100
@@ -16,6 +16,7 @@
 import javax.persistence.Id;
 import javax.persistence.MappedSuperclass;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 
 
 /**
@@ -40,6 +41,12 @@
     @Column(name="probe_id")
     private Integer probeId;
 
+    @Transient
+    private boolean owner;
+
+    @Transient
+    private boolean readonly;
+
     public KommentarP() {
     }
 
@@ -82,4 +89,20 @@
     public void setProbeId(Integer probeId) {
         this.probeId = probeId;
     }
+
+    public boolean isOwner() {
+        return owner;
+    }
+
+    public void setOwner(boolean owner) {
+        this.owner = owner;
+    }
+
+    public boolean isReadonly() {
+        return readonly;
+    }
+
+    public void setReadonly(boolean readonly) {
+        this.readonly = readonly;
+    }
 }
diff -r b0d674240c29 -r 4f83f2fc188a src/main/java/de/intevation/lada/model/Messung.java
--- a/src/main/java/de/intevation/lada/model/Messung.java	Thu Mar 19 14:28:44 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/Messung.java	Mon Mar 23 17:42:16 2015 +0100
@@ -16,6 +16,7 @@
 import javax.persistence.Id;
 import javax.persistence.MappedSuperclass;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 
 
 /**
@@ -46,6 +47,12 @@
     @Column(name="probe_id")
     private Integer probeId;
 
+    @Transient
+    private boolean owner;
+
+    @Transient
+    private boolean readonly;
+
     public Messung() {
     }
 
@@ -104,4 +111,20 @@
     public void setProbeId(Integer probeId) {
         this.probeId = probeId;
     }
+
+    public boolean isOwner() {
+        return owner;
+    }
+
+    public void setOwner(boolean owner) {
+        this.owner = owner;
+    }
+
+    public boolean isReadonly() {
+        return readonly;
+    }
+
+    public void setReadonly(boolean readonly) {
+        this.readonly = readonly;
+    }
 }
diff -r b0d674240c29 -r 4f83f2fc188a src/main/java/de/intevation/lada/model/Messwert.java
--- a/src/main/java/de/intevation/lada/model/Messwert.java	Thu Mar 19 14:28:44 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/Messwert.java	Mon Mar 23 17:42:16 2015 +0100
@@ -16,6 +16,7 @@
 import javax.persistence.Id;
 import javax.persistence.MappedSuperclass;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 
 
 /**
@@ -55,6 +56,12 @@
     @Column(name="nwg_zu_messwert")
     private Float nwgZuMesswert;
 
+    @Transient
+    private boolean owner;
+
+    @Transient
+    private boolean readonly;
+
     public Messwert() {
     }
 
@@ -138,4 +145,20 @@
         this.nwgZuMesswert = nwgZuMesswert;
     }
 
+    public boolean isOwner() {
+        return owner;
+    }
+
+    public void setOwner(boolean owner) {
+        this.owner = owner;
+    }
+
+    public boolean isReadonly() {
+        return readonly;
+    }
+
+    public void setReadonly(boolean readonly) {
+        this.readonly = readonly;
+    }
+
 }
diff -r b0d674240c29 -r 4f83f2fc188a src/main/java/de/intevation/lada/model/Ort.java
--- a/src/main/java/de/intevation/lada/model/Ort.java	Thu Mar 19 14:28:44 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/Ort.java	Mon Mar 23 17:42:16 2015 +0100
@@ -17,6 +17,7 @@
 import javax.persistence.Id;
 import javax.persistence.MappedSuperclass;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 
 
 /**
@@ -46,6 +47,12 @@
     @Column(name="ort_id")
     private BigInteger ort;
 
+    @Transient
+    private boolean owner;
+
+    @Transient
+    private boolean readonly;
+
     public Ort() {
     }
 
@@ -96,4 +103,20 @@
     public void setOrt(BigInteger ort) {
         this.ort = ort;
     }
+
+    public boolean isOwner() {
+        return owner;
+    }
+
+    public void setOwner(boolean owner) {
+        this.owner = owner;
+    }
+
+    public boolean isReadonly() {
+        return readonly;
+    }
+
+    public void setReadonly(boolean readonly) {
+        this.readonly = readonly;
+    }
 }
diff -r b0d674240c29 -r 4f83f2fc188a src/main/java/de/intevation/lada/model/Status.java
--- a/src/main/java/de/intevation/lada/model/Status.java	Thu Mar 19 14:28:44 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/Status.java	Mon Mar 23 17:42:16 2015 +0100
@@ -8,9 +8,16 @@
 package de.intevation.lada.model;
 
 import java.io.Serializable;
-import javax.persistence.*;
 import java.sql.Timestamp;
 
+import javax.persistence.Column;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.MappedSuperclass;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
 
 /**
  * The persistent class for the status database table.
@@ -38,6 +45,12 @@
 
     private Integer status;
 
+    @Transient
+    private boolean owner;
+
+    @Transient
+    private boolean readonly;
+
     public Status() {
     }
 
@@ -88,4 +101,20 @@
     public void setStatus(Integer status) {
         this.status = status;
     }
+
+    public boolean isOwner() {
+        return owner;
+    }
+
+    public void setOwner(boolean owner) {
+        this.owner = owner;
+    }
+
+    public boolean isReadonly() {
+        return readonly;
+    }
+
+    public void setReadonly(boolean readonly) {
+        this.readonly = readonly;
+    }
 }
diff -r b0d674240c29 -r 4f83f2fc188a src/main/java/de/intevation/lada/model/ZusatzWert.java
--- a/src/main/java/de/intevation/lada/model/ZusatzWert.java	Thu Mar 19 14:28:44 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/ZusatzWert.java	Mon Mar 23 17:42:16 2015 +0100
@@ -8,9 +8,16 @@
 package de.intevation.lada.model;
 
 import java.io.Serializable;
-import javax.persistence.*;
 import java.sql.Timestamp;
 
+import javax.persistence.Column;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.MappedSuperclass;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
 
 /**
  * The persistent class for the zusatz_wert database table.
@@ -42,6 +49,12 @@
     @Column(name="pzs_id")
     private String pzsId;
 
+    @Transient
+    private boolean owner;
+
+    @Transient
+    private boolean readonly;
+
     public ZusatzWert() {
     }
 
@@ -101,4 +114,20 @@
         this.pzsId = pzsId;
     }
 
+    public boolean isOwner() {
+        return owner;
+    }
+
+    public void setOwner(boolean owner) {
+        this.owner = owner;
+    }
+
+    public boolean isReadonly() {
+        return readonly;
+    }
+
+    public void setReadonly(boolean readonly) {
+        this.readonly = readonly;
+    }
+
 }
diff -r b0d674240c29 -r 4f83f2fc188a src/main/java/de/intevation/lada/model/land/LProbe.java
--- a/src/main/java/de/intevation/lada/model/land/LProbe.java	Thu Mar 19 14:28:44 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/land/LProbe.java	Mon Mar 23 17:42:16 2015 +0100
@@ -13,6 +13,7 @@
 import javax.persistence.Entity;
 import javax.persistence.OneToOne;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
 
@@ -54,6 +55,12 @@
     @Column(name="solldatum_ende")
     private Timestamp solldatumEnde;
 
+    @Transient
+    private boolean readonly;
+
+    @Transient
+    private boolean owner;
+
     public LProbe() {
     }
 
@@ -142,10 +149,18 @@
     public void setProbeIdAlt(String probeIdAlt) {}
 
     public boolean getIsOwner() {
-        return true; //TODO set a valid value in authorization process.
+        return this.owner; //TODO set a valid value in authorization process.
+    }
+
+    public void setIsOwner(boolean value) {
+        this.owner = value;
     }
 
     public boolean getReadonly() {
-        return false; //TODO set a valid value in authorization process.
+        return this.readonly; //TODO set a valid value in authorization process.
+    }
+
+    public void setReadonly(boolean value) {
+        this.readonly = value;
     }
 }


More information about the Lada-commits mailing list