[Dive4elements-commits] [PATCH 2 of 8] Add id, kmup and operator to MeasurementStation model

Wald Commits scm-commit at wald.intevation.org
Fri Oct 26 12:27:38 CEST 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1351246418 -7200
# Node ID d5d68c5bf0852afa1261bfeb08c14cb09bedcd82
# Parent  31c01742050201ef5006090a1c40a6ce593b9ea4
Add id, kmup and operator to MeasurementStation model

Also add getters for these variables

diff -r 31c017420502 -r d5d68c5bf085 flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultMeasurementStation.java
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultMeasurementStation.java	Fri Oct 26 11:57:25 2012 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultMeasurementStation.java	Fri Oct 26 12:13:38 2012 +0200
@@ -5,25 +5,31 @@
  */
 public class DefaultMeasurementStation implements MeasurementStation {
 
-    private String name;
-    private Double start;
-    private Double end;
-    private Double station;
-    private String rivername;
-    private String measurementtype;
-    private String riverside;
+    private String  name;
+    private Double  start;
+    private Double  end;
+    private Double  station;
+    private String  rivername;
+    private String  measurementtype;
+    private String  riverside;
+    private Integer id;
+    private boolean kmup;
+    private String  moperator;
 
     public DefaultMeasurementStation() {
     }
 
     public DefaultMeasurementStation(
-            String rivername,
-            String name,
-            Double station,
-            Double start,
-            Double end,
-            String riverside,
-            String measurementtype)
+            String  rivername,
+            String  name,
+            Integer id,
+            Double  station,
+            Double  start,
+            Double  end,
+            boolean kmup,
+            String  riverside,
+            String  measurementtype,
+            String  moperator)
     {
         this.rivername       = rivername;
         this.name            = name;
@@ -32,6 +38,9 @@
         this.end             = end;
         this.riverside       = riverside;
         this.measurementtype = measurementtype;
+        this.id              = id;
+        this.kmup            = kmup;
+        this.moperator       = moperator;
     }
 
     /**
@@ -90,4 +99,25 @@
     public String getRiverSide() {
         return this.riverside;
     }
+
+    /**
+     * Returns the ID of the measurement station
+     */
+    @Override
+    public Integer getID() {
+        return this.id;
+    }
+
+    @Override
+    public boolean isKmUp() {
+        return this.kmup;
+    }
+
+    /**
+     * Returns the operator of the measurement station
+     */
+    @Override
+    public String getOperator() {
+        return this.moperator;
+    }
 }
diff -r 31c017420502 -r d5d68c5bf085 flys-client/src/main/java/de/intevation/flys/client/shared/model/MeasurementStation.java
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/MeasurementStation.java	Fri Oct 26 11:57:25 2012 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/MeasurementStation.java	Fri Oct 26 12:13:38 2012 +0200
@@ -22,6 +22,8 @@
      */
     Double getKmEnd();
 
+    boolean isKmUp();
+
     /**
      * Returns the station km of the measurement station or null if not
      * available
@@ -42,4 +44,14 @@
      * Returns the type of the measurement station
      */
     String getMeasurementType();
+
+    /**
+     * Returns the ID of the measurement station
+     */
+    Integer getID();
+
+    /**
+     * Returns the operator of the measurement station
+     */
+    String getOperator();
 }


More information about the Dive4elements-commits mailing list