Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/StaticSQCacheKey.java @ 5500:700ac898ab0b
Added Factory and model for static sq relations.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 28 Mar 2013 15:15:33 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
5499:43bf4976dd24 | 5500:700ac898ab0b |
---|---|
1 package de.intevation.flys.artifacts.model.sq; | |
2 | |
3 import java.io.Serializable; | |
4 | |
5 | |
6 public class StaticSQCacheKey | |
7 implements Serializable | |
8 { | |
9 public static final String CACHE_NAME = "static-sq-relation"; | |
10 | |
11 private String river; | |
12 private int measurementId; | |
13 | |
14 public StaticSQCacheKey(String river, int measurementId) { | |
15 this.river = river; | |
16 this.measurementId = measurementId; | |
17 } | |
18 | |
19 public int hashCode() { | |
20 return this.river.hashCode() | measurementId; | |
21 } | |
22 | |
23 public boolean equals(Object other) { | |
24 if (!(other instanceof StaticSQCacheKey)) { | |
25 return false; | |
26 } | |
27 StaticSQCacheKey o = (StaticSQCacheKey) other; | |
28 return this.river == o.river && this.measurementId == o.measurementId; | |
29 } | |
30 } |