Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/transition/MinMaxTransition.java @ 207:d87347142702
Store the Results of an Artifact not in the Artifact but in an ehcache instance. issue3
gnv-artifacts/trunk@263 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 23 Oct 2009 08:50:50 +0000 |
parents | baaa1618fa27 |
children | ee2d4134d0b3 |
comparison
equal
deleted
inserted
replaced
206:01ac348ac4a4 | 207:d87347142702 |
---|---|
17 * | 17 * |
18 */ | 18 */ |
19 public class MinMaxTransition extends TransitionBase { | 19 public class MinMaxTransition extends TransitionBase { |
20 | 20 |
21 /** | 21 /** |
22 * The UID of this Class | |
23 */ | |
24 private static final long serialVersionUID = -3525903792105187408L; | |
25 /** | |
22 * the logger, used to log exceptions and additonaly information | 26 * the logger, used to log exceptions and additonaly information |
23 */ | 27 */ |
24 private static Logger log = Logger.getLogger(MinMaxTransition.class); | 28 private static Logger log = Logger.getLogger(MinMaxTransition.class); |
25 | 29 |
26 /** | 30 /** |
35 * java.lang.String) | 39 * java.lang.String) |
36 */ | 40 */ |
37 @Override | 41 @Override |
38 protected void purifyResult(Collection<Result> result, String uuid) { | 42 protected void purifyResult(Collection<Result> result, String uuid) { |
39 log.debug("MinMaxTransition.purifyResult"); | 43 log.debug("MinMaxTransition.purifyResult"); |
40 if (this.descibeData == null) { | 44 Collection<Object> describeData = this.getDescibeData(uuid); |
41 this.descibeData = new ArrayList<Object>(); | 45 if (describeData == null) { |
46 describeData = new ArrayList<Object>(); | |
42 } | 47 } |
43 if (result != null && result.size() == 1) { | 48 if (result != null && result.size() == 1) { |
44 | 49 |
45 String minName = this.dataName; | 50 String minName = this.dataName; |
46 String maxName = this.dataName; | 51 String maxName = this.dataName; |
47 Result value = result.iterator().next(); | 52 Result value = result.iterator().next(); |
48 DescribeData describeData = new DefaultMinMaxDescribeData(minName, | 53 DescribeData values = new DefaultMinMaxDescribeData(minName, |
49 maxName, value.getObject("MIN"), value.getObject("MAX")); | 54 maxName, value.getObject("MIN"), value.getObject("MAX")); |
50 log.debug(describeData.toString()); | 55 log.debug(values.toString()); |
51 this.descibeData.add(describeData); | 56 describeData.add(values); |
52 } else { | 57 } else { |
53 log.warn("Result cannot be handled as MinMax Resultset"); | 58 log.warn("Result cannot be handled as MinMax Resultset"); |
54 } | 59 } |
55 | 60 this.setDescibeData(uuid, describeData); |
56 } | 61 } |
57 | 62 |
58 /** | 63 /** |
59 * @see de.intevation.gnv.transition.Transition#validate() | 64 * @see de.intevation.gnv.transition.Transition#validate() |
60 */ | 65 */ |