sascha@626: package de.intevation.flys.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 :