Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/StaticBedHeightCacheKey.java @ 5711:06f3a36a83b6
Merged.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Mon, 15 Apr 2013 16:29:54 +0200 |
parents | 68beaa827751 |
children |
rev | line source |
---|---|
3614
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model; |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
3 import java.io.Serializable; |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
4 |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
5 public class StaticBedHeightCacheKey implements Serializable { |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
6 public static final String CACHE_NAME = "bedheight-value-table-static"; |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
7 |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
8 private int time; |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
9 private int height_id; |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 public StaticBedHeightCacheKey(int column, int wst_id) { |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 this.height_id = wst_id; |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 this.time = column; |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 } |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 public int hashCode() { |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
17 return (height_id << 8) | time; |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 } |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 public boolean equals(Object other) { |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 if (!(other instanceof StaticBedHeightCacheKey)) { |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 return false; |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 } |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 StaticBedHeightCacheKey o = (StaticBedHeightCacheKey) other; |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 return this.height_id == o.height_id && this.time == o.time; |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 } |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 } |
68beaa827751
MINFO: Implemented UI and facet/artifact stack for bed height differences.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |