diff artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefinedcollision/PredefinedCollisionAccess.java @ 9377:e8d65cecc950

Renaming (predefined...) and own package for database loaded S-Info series of collisions and infrastructure height
author mschaefer
date Mon, 06 Aug 2018 11:48:49 +0200
parents artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/CollisionDbAccess.java@820ae41c81b6
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefinedcollision/PredefinedCollisionAccess.java	Mon Aug 06 11:48:49 2018 +0200
@@ -0,0 +1,52 @@
+/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
+ * Software engineering by
+ *  Björnsen Beratende Ingenieure GmbH
+ *  Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
+package org.dive4elements.river.artifacts.sinfo.predefinedcollision;
+
+import org.dive4elements.river.artifacts.D4EArtifact;
+import org.dive4elements.river.artifacts.access.RangeAccess;
+
+/**
+ * Access to the database loaded river bed collision artifact data
+ *
+ * @author Matthias Schäfer
+ */
+final class PredefinedCollisionAccess extends RangeAccess {
+
+    /***** FIELDS *****/
+
+    private Integer id;
+
+    private String name;
+
+
+    /***** CONSTRUCTORS *****/
+
+    public PredefinedCollisionAccess(final D4EArtifact artifact) {
+        super(artifact);
+    }
+
+
+    /***** METHODS *****/
+
+    public Integer getId() {
+        if (this.id == null) {
+            this.id = getInteger("collision_id");
+        }
+        return this.id;
+    }
+
+    public String getName() {
+        if (this.name == null) {
+            this.name = getString("name");
+        }
+        return this.name;
+    }
+}
\ No newline at end of file

http://dive4elements.wald.intevation.org