teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5863: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5863: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.artifacts.model; sascha@626: sascha@626: import java.io.Serializable; sascha@626: felix@1928: /** felix@1928: * Cache Key (identifier) for WstValueTables. felix@1928: */ sascha@626: public final class WstValueTableCacheKey sascha@626: implements Serializable sascha@626: { sascha@632: public static final String CACHE_NAME = "wst-value-table"; sascha@632: sascha@626: private int riverId; sascha@626: private int kind; sascha@626: sascha@626: public WstValueTableCacheKey(int riverId, int kind) { sascha@626: this.riverId = riverId; sascha@626: this.kind = kind; sascha@626: } sascha@626: sascha@626: public int hashCode() { sascha@626: return (riverId << 8) | kind; sascha@626: } sascha@626: sascha@626: public boolean equals(Object other) { sascha@626: if (!(other instanceof WstValueTableCacheKey)) { sascha@626: return false; sascha@626: } sascha@626: WstValueTableCacheKey o = (WstValueTableCacheKey)other; sascha@626: return riverId == o.riverId && kind == o.kind; sascha@626: } sascha@626: } sascha@626: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :