Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/StaticPorosityCacheKey.java @ 7852:6e346ef4446f
Added cache key class for porosity.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 30 Apr 2014 15:28:04 +0200 |
parents | |
children | 92a2b9b691e1 |
comparison
equal
deleted
inserted
replaced
7851:b566cd0c025a | 7852:6e346ef4446f |
---|---|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde | |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU AGPL (>=v3) | |
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
6 * documentation coming with Dive4Elements River for details. | |
7 */ | |
8 | |
9 package org.dive4elements.river.artifacts.model; | |
10 | |
11 | |
12 public class StaticPorosityCacheKey | |
13 { | |
14 public static final String CACHE_NAME = "porosity-table-static"; | |
15 | |
16 private int porosity_id; | |
17 | |
18 public StaticPorosityCacheKey( | |
19 int porosity_id | |
20 ) { | |
21 this.porosity_id = porosity_id; | |
22 } | |
23 | |
24 @Override | |
25 public int hashCode() { | |
26 return (String.valueOf(porosity_id)).hashCode(); | |
27 } | |
28 | |
29 @Override | |
30 public boolean equals(Object other) { | |
31 if (!(other instanceof StaticPorosityCacheKey)) { | |
32 return false; | |
33 } | |
34 StaticPorosityCacheKey o = (StaticPorosityCacheKey) other; | |
35 return this.porosity_id == o.porosity_id; | |
36 } | |
37 } |