Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/StaticSedimentLoadCacheKey.java @ 4745:c10103dc202f
Remove commented code.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 03 Jan 2013 09:56:43 +0100 |
parents | 3937c6a85db4 |
children |
rev | line source |
---|---|
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
2 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
3 import org.apache.commons.lang.builder.HashCodeBuilder; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
4 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
5 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
6 public class StaticSedimentLoadCacheKey |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
7 { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
8 public static final String CACHE_NAME = "sedimentload-value-table-static"; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
9 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
10 private String river; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 private double startKm; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
12 private double endKm; |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
13 private int sYear; |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
14 private int eYear; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
15 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
16 public StaticSedimentLoadCacheKey( |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
17 String river, |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
18 double startKm, |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
19 double endKm, |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
20 int sYear, |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
21 int eYear |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
22 ) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 this.river = river; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 this.startKm = startKm; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
25 this.endKm = endKm; |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
26 this.sYear = sYear; |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
27 this.eYear = eYear; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
29 |
4382
3937c6a85db4
Removed superfluous imports.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4370
diff
changeset
|
30 @Override |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
31 public int hashCode() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 HashCodeBuilder builder = new HashCodeBuilder(); |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 builder.append(river); |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
34 builder.append(startKm); |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
35 builder.append(endKm); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
36 builder.append(sYear); |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
37 builder.append(eYear); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
38 return builder.toHashCode(); |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
39 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
40 |
4382
3937c6a85db4
Removed superfluous imports.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4370
diff
changeset
|
41 @Override |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
42 public boolean equals(Object other) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
43 if (!(other instanceof StaticBedHeightCacheKey)) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
44 return false; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
45 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
46 StaticSedimentLoadCacheKey o = (StaticSedimentLoadCacheKey) other; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
47 return this.river == o.river && |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
48 this.startKm == o.startKm && |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
49 this.endKm == o.endKm && |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
50 this.sYear == o.sYear && |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
51 this.eYear == o.eYear; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
52 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
53 } |