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