annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixWaterlevelFacet.java @ 3461:1481322efc02

FixA: Removed instanceof hack to fetch the WQKms of the fix realizations. flys-artifacts/trunk@5129 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 25 Jul 2012 15:07:14 +0000
parents
children bae2b1568f3d
rev   line source
3461
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.model.fixings;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 import de.intevation.artifactdatabase.state.Facet;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
4
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
5 import de.intevation.flys.artifacts.model.CalculationResult;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
6 import de.intevation.flys.artifacts.model.WQKms;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
7 import de.intevation.flys.artifacts.model.WaterlevelFacet;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9 import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11 public class FixWaterlevelFacet
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12 extends WaterlevelFacet
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13 {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14 public FixWaterlevelFacet() {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17 public FixWaterlevelFacet(int index, String name, String description) {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18 super(index, name, description, ComputeType.ADVANCE, null, null);
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
19 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
20
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
21 public FixWaterlevelFacet(
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
22 int index,
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
23 String name,
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
24 String description,
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
25 ComputeType type,
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
26 String stateID,
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
27 String hash
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
28 ) {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
29 super(index, name, description, type, hash, stateID);
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
30 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
31
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
32 @Override
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
33 protected WQKms [] getWQKms(CalculationResult res) {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
34 FixRealizingResult fr = (FixRealizingResult)res.getData();
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
35 return fr != null ? fr.getWQKms() : null;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
36 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
37
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
38 /** Copy deeply. */
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
39 @Override
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
40 public Facet deepCopy() {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
41 FixWaterlevelFacet copy = new FixWaterlevelFacet();
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
42 copy.set(this);
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
43 copy.type = type;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
44 copy.hash = hash;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
45 copy.stateId = stateId;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
46 return copy;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
47 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
48 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
49 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org