Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/StaticBedHeightCacheKey.java @ 4375:532272d9f2e0
Updated i18n strings for sediment load.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 02 Nov 2012 15:38:08 +0100 |
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 : |