comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTableCacheKey.java @ 3318:dbe2f85bf160

merged flys-artifacts/2.8
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:35 +0200
parents 305a338c43c2
children
comparison
equal deleted inserted replaced
2987:98c7a46ec5ae 3318:dbe2f85bf160
1 package de.intevation.flys.artifacts.model;
2
3 import java.io.Serializable;
4
5 /**
6 * Cache Key (identifier) for WstValueTables.
7 */
8 public final class WstValueTableCacheKey
9 implements Serializable
10 {
11 public static final String CACHE_NAME = "wst-value-table";
12
13 private int riverId;
14 private int kind;
15
16 public WstValueTableCacheKey(int riverId, int kind) {
17 this.riverId = riverId;
18 this.kind = kind;
19 }
20
21 public int hashCode() {
22 return (riverId << 8) | kind;
23 }
24
25 public boolean equals(Object other) {
26 if (!(other instanceof WstValueTableCacheKey)) {
27 return false;
28 }
29 WstValueTableCacheKey o = (WstValueTableCacheKey)other;
30 return riverId == o.riverId && kind == o.kind;
31 }
32 }
33 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org