rrenkert@7852: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde rrenkert@7852: * Software engineering by Intevation GmbH rrenkert@7852: * rrenkert@7852: * This file is Free Software under the GNU AGPL (>=v3) rrenkert@7852: * and comes with ABSOLUTELY NO WARRANTY! Check out the rrenkert@7852: * documentation coming with Dive4Elements River for details. rrenkert@7852: */ rrenkert@7852: rrenkert@7852: package org.dive4elements.river.artifacts.model; rrenkert@7852: teichmann@7855: import java.io.Serializable; teichmann@7855: rrenkert@7852: rrenkert@7852: public class StaticPorosityCacheKey teichmann@7855: implements Serializable rrenkert@7852: { rrenkert@7852: public static final String CACHE_NAME = "porosity-table-static"; rrenkert@7852: teichmann@7855: private int porosityId; rrenkert@7852: rrenkert@7852: public StaticPorosityCacheKey( teichmann@7855: int porosityId rrenkert@7852: ) { teichmann@7855: this.porosityId = porosityId; rrenkert@7852: } rrenkert@7852: rrenkert@7852: @Override rrenkert@7852: public int hashCode() { teichmann@7855: return (String.valueOf(porosityId)).hashCode(); rrenkert@7852: } rrenkert@7852: rrenkert@7852: @Override rrenkert@7852: public boolean equals(Object other) { rrenkert@7852: if (!(other instanceof StaticPorosityCacheKey)) { rrenkert@7852: return false; rrenkert@7852: } rrenkert@7852: StaticPorosityCacheKey o = (StaticPorosityCacheKey) other; teichmann@7855: return this.porosityId == o.porosityId; rrenkert@7852: } rrenkert@7852: }