diff flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/StaticWQKmsCacheKey.java @ 5831:bd047b71ab37

Repaired internal references
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 12:06:39 +0200
parents flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/StaticWQKmsCacheKey.java@17e7a0d063bd
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/StaticWQKmsCacheKey.java	Thu Apr 25 12:06:39 2013 +0200
@@ -0,0 +1,33 @@
+package org.dive4elements.river.artifacts.model;
+
+import java.io.Serializable;
+
+/**
+ * Caching-Key object for 'static' wst- data.
+ */
+public final class StaticWQKmsCacheKey
+implements         Serializable
+{
+    public static final String CACHE_NAME = "wst-wq-value-table-static";
+
+    private int column;
+    private int wst_id;
+
+    public StaticWQKmsCacheKey(int column, int wst_id) {
+        this.wst_id  = wst_id;
+        this.column  = column;
+    }
+
+    public int hashCode() {
+        return (wst_id << 8) | column;
+    }
+
+    public boolean equals(Object other) {
+        if (!(other instanceof StaticWQKmsCacheKey)) {
+            return false;
+        }
+        StaticWQKmsCacheKey o = (StaticWQKmsCacheKey) other;
+        return this.wst_id == o.wst_id && this.column == o.column;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org