changeset 7852:6e346ef4446f

Added cache key class for porosity.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 30 Apr 2014 15:28:04 +0200
parents b566cd0c025a
children 57bd0a586a9b
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/StaticPorosityCacheKey.java
diffstat 1 files changed, 37 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/StaticPorosityCacheKey.java	Wed Apr 30 15:28:04 2014 +0200
@@ -0,0 +1,37 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * 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.model;
+
+
+public class StaticPorosityCacheKey
+{
+   public static final String CACHE_NAME = "porosity-table-static";
+
+    private int porosity_id;
+
+    public StaticPorosityCacheKey(
+        int porosity_id
+    ) {
+        this.porosity_id = porosity_id;
+    }
+
+    @Override
+    public int hashCode() {
+        return (String.valueOf(porosity_id)).hashCode();
+    }
+
+    @Override
+    public boolean equals(Object other) {
+        if (!(other instanceof StaticPorosityCacheKey)) {
+            return false;
+        }
+        StaticPorosityCacheKey o = (StaticPorosityCacheKey) other;
+        return this.porosity_id == o.porosity_id;
+    }
+}

http://dive4elements.wald.intevation.org