Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/StaticWKmsCacheKey.java @ 1767:b2730e31ff5b
Store Facets without association to state id.
flys-artifacts/trunk@3088 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 26 Oct 2011 12:45:34 +0000 |
parents | fb4fb1c67c35 |
children |
rev | line source |
---|---|
1722
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model; |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
2 |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
3 import java.io.Serializable; |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
4 |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
5 /** |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
6 * Caching-Key object for 'static' wst- data. |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
7 */ |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
8 public final class StaticWKmsCacheKey |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
9 implements Serializable |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
10 { |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
11 public static final String CACHE_NAME = "wst-value-table-static"; |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
12 |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
13 private int column; |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
14 private int wst_id; |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
15 |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
16 public StaticWKmsCacheKey(int column, int wst_id) { |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
17 this.wst_id = wst_id; |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
18 this.column = column; |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
19 } |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
20 |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
21 public int hashCode() { |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
22 return (wst_id << 8) | column; |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
23 } |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
24 |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
25 public boolean equals(Object other) { |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
26 if (!(other instanceof StaticWKmsCacheKey)) { |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
27 return false; |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
28 } |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
29 StaticWKmsCacheKey o = (StaticWKmsCacheKey) other; |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
30 return wst_id == o.wst_id && this.column == o.column; |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
31 } |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
32 } |
fb4fb1c67c35
Added WKmsFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
33 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |