comparison gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java @ 99:bb45c5097cb6

ehcache Integration for storing the chartresultvalues gnv-artifacts/trunk@146 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 28 Sep 2009 14:17:15 +0000
parents 1b12021905b9
children e01c163ea5b0
comparison
equal deleted inserted replaced
98:156db25ad4b4 99:bb45c5097cb6
68 68
69 private Map<String,InputValue> inputValues = null; 69 private Map<String,InputValue> inputValues = null;
70 70
71 private Transition parent = null; 71 private Transition parent = null;
72 72
73 private Map<String,InputData> inputData = null; 73 protected Map<String,InputData> inputData = null;
74 74
75 protected Collection<Object> descibeData = null; 75 protected Collection<Object> descibeData = null;
76 76
77 /** 77 /**
78 * Constructor 78 * Constructor
178 } 178 }
179 179
180 /** 180 /**
181 * @see de.intevation.gnv.transition.Transition#putInputData(java.util.Collection) 181 * @see de.intevation.gnv.transition.Transition#putInputData(java.util.Collection)
182 */ 182 */
183 public void putInputData(Collection<InputData> inputData) throws TransitionException { 183 public void putInputData(Collection<InputData> inputData, String uuid) throws TransitionException {
184 log.debug("TransitionBase.putInputData"); 184 log.debug("TransitionBase.putInputData");
185 if (inputData != null){ 185 if (inputData != null){
186 Iterator<InputData> it = inputData.iterator(); 186 Iterator<InputData> it = inputData.iterator();
187 while(it.hasNext()){ 187 while(it.hasNext()){
188 InputData tmpItem = it.next(); 188 InputData tmpItem = it.next();
282 } 282 }
283 283
284 /** 284 /**
285 * @see de.intevation.gnv.transition.Transition#advance() 285 * @see de.intevation.gnv.transition.Transition#advance()
286 */ 286 */
287 public void advance() throws TransitionException { 287 public void advance(String uuid) throws TransitionException {
288 log.debug("TransitionBase.advance"); 288 log.debug("TransitionBase.advance");
289 try { 289 try {
290 List<String> list = new ArrayList<String>(); 290 List<String> list = new ArrayList<String>();
291 291
292 292
314 try { 314 try {
315 if (this.queryID != null){ 315 if (this.queryID != null){
316 QueryExecutor queryExecutor = QueryExecutorFactory.getInstance().getQueryExecutor(); 316 QueryExecutor queryExecutor = QueryExecutorFactory.getInstance().getQueryExecutor();
317 result = queryExecutor.executeQuery(this.queryID, filterValues); 317 result = queryExecutor.executeQuery(this.queryID, filterValues);
318 } 318 }
319 this.purifyResult(result); 319 this.purifyResult(result, uuid);
320 } catch (RuntimeException e) { 320 } catch (RuntimeException e) {
321 log.error(e,e); 321 log.error(e,e);
322 } 322 }
323 } catch (QueryException e) { 323 } catch (QueryException e) {
324 log.error(e,e); 324 log.error(e,e);
360 } 360 }
361 361
362 /** 362 /**
363 * @param result 363 * @param result
364 */ 364 */
365 protected void purifyResult(Collection<Result> result) { 365 protected void purifyResult(Collection<Result> result, String uuid) {
366 if (this.descibeData == null){ 366 if (this.descibeData == null){
367 this.descibeData = new ArrayList<Object>(); 367 this.descibeData = new ArrayList<Object>();
368 } 368 }
369 Iterator<Result> rit = result.iterator(); 369 Iterator<Result> rit = result.iterator();
370 NamedCollection<KeyValueDescibeData> keyValueDescibeData = new NamedArrayList<KeyValueDescibeData>(this.dataName,result.size()); 370 NamedCollection<KeyValueDescibeData> keyValueDescibeData = new NamedArrayList<KeyValueDescibeData>(this.dataName,result.size());

http://dive4elements.wald.intevation.org