[Lada-commits] [PATCH 1 of 2] Removed columns in LProbeInfo entity and use readonly flag instead of 'fertig'
Wald Commits
scm-commit at wald.intevation.org
Fri Sep 27 10:17:04 CEST 2013
# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1380269974 -7200
# Node ID 4f42d1b2570a40b33e5ce2fd90e5192cf01923da
# Parent 958b7ffbbfcc40e99318f45ea5fcedee6ee2e80f
Removed columns in LProbeInfo entity and use readonly flag instead of 'fertig'.
diff -r 958b7ffbbfcc -r 4f42d1b2570a src/main/java/de/intevation/lada/model/LProbeInfo.java
--- a/src/main/java/de/intevation/lada/model/LProbeInfo.java Tue Sep 24 14:01:06 2013 +0200
+++ b/src/main/java/de/intevation/lada/model/LProbeInfo.java Fri Sep 27 10:19:34 2013 +0200
@@ -53,9 +53,6 @@
@Column(name="mst_id")
private String mstId;
- @Column(name="nebenproben_nr", insertable = false, updatable = false)
- private String nebenprobenNr;
-
@Column(name="netzbetreiber_id")
private String netzbetreiberId;
@@ -86,12 +83,6 @@
@Column(name="umw_id")
private String umwId;
- @Column(name="messmethode")
- private String messmethode;
-
- @Column(name="fertig")
- private Boolean fertig;
-
@Column(name="readonly")
private Boolean readonly;
@@ -194,14 +185,6 @@
this.mstId = mstId;
}
- public String getNebenprobenNr() {
- return this.nebenprobenNr;
- }
-
- public void setNebenprobenNr(String nebenprobenNr) {
- this.nebenprobenNr = nebenprobenNr;
- }
-
public String getNetzbetreiberId() {
return this.netzbetreiberId;
}
@@ -282,22 +265,6 @@
this.umwId = umwId;
}
- public String getMessmethode() {
- return messmethode;
- }
-
- public void setMessmethode(String messmethode) {
- this.messmethode = messmethode;
- }
-
- public Boolean getFertig() {
- return fertig;
- }
-
- public void setFertig(Boolean fertig) {
- this.fertig = fertig;
- }
-
public Boolean getReadonly() {
return readonly;
}
diff -r 958b7ffbbfcc -r 4f42d1b2570a src/main/java/de/intevation/lada/rest/LProbeService.java
--- a/src/main/java/de/intevation/lada/rest/LProbeService.java Tue Sep 24 14:01:06 2013 +0200
+++ b/src/main/java/de/intevation/lada/rest/LProbeService.java Fri Sep 27 10:19:34 2013 +0200
@@ -117,7 +117,7 @@
String nbId = probe.get(0).getNetzbetreiberId();
String mstId = probe.get(0).getMstId();
if (auth.getNetzbetreiber().contains(nbId) ||
- probe.get(0).getFertig()) {
+ probe.get(0).getReadonly()) {
if (auth.getMst().contains(mstId)) {
return response;
}
@@ -158,7 +158,7 @@
new QueryBuilder<LProbeInfo>(
repository.getEntityManager(),
LProbeInfo.class);
- builder.or("fertig", true);
+ builder.or("readonly", true);
List<String> netzbetreiberIds = auth.getNetzbetreiber();
for (String netzbetreiberId: netzbetreiberIds) {
builder.or("netzbetreiberId", netzbetreiberId);
@@ -203,7 +203,7 @@
subselect += "or netzbetreiber_id = '" + netzbetreiberId + "' ";
}
}
- subselect += "or fertig = true) as lp";
+ subselect += "or readonly = true) as lp";
sql = sql.replace("l_probe", subselect);
return lpr.filterFree(sql, filters, results, params);
}
More information about the Lada-commits
mailing list