Changeset 53 for gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java
- Timestamp:
- 09/01/11 14:23:18 (14 years ago)
- Location:
- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudio.java
r43 r53 326 326 } 327 327 328 @BlazeDsMethod() 329 public GSSimStudioModel getExperimentConfiguration(List experiments) { 330 331 GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel(); 332 333 Connection connection = null; 334 try { 335 connection = factory().createDBConnection(dbAddress, dbUser, 336 dbPassword); 337 338 ExperimentDAO experimentDAO = factory.createExperiment(); 339 340 HashMap result = new HashMap(); 341 342 for (int i = 0; i < experiments.size(); i++) 343 { 344 Experiment exp = new Experiment(); 345 exp.setPK(experiments.get(i)); 346 exp = experimentDAO.select(exp); 347 348 TextPropertyDAO propertyDAO = factory.createTextProperty(); 349 Finder finder = Finder.getTextPropertyFinder(exp.getConfigId()); 350 351 List<TextProperty> list = propertyDAO.find(finder); 352 HashMap<String, String> map = new HashMap<String, String>(); 353 for (int i = 0; i < list.size(); i++) 354 { 355 map.put(list.get(i).getName(), list.get(i).getValue()); 356 } 357 result.put(exp.getPK().toString(), map); 358 } 359 360 model.setExperimentsConfiguration(result); 361 362 } catch (SQLException e) { 363 setSqlError("Resources", model, e); 364 } catch (InstantiationException e) { 365 setDbConnectionError(model, e); 366 } catch (IllegalAccessException e) { 367 setDbConnectionError(model, e); 368 } catch (ClassNotFoundException e) { 369 setDbConnectionError(model, e); 370 } catch (Exception e) { 371 setError("Unexpected error occured", model, e); 372 } finally { 373 closeConnection(connection, model); 374 } 375 376 return model; 377 } 378 328 379 protected int addExperimentToDb(String expName, String metaexperiment) { 329 380 Connection connection = null; -
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudioModel.java
r22 r53 38 38 39 39 public GSSimStudioModel() { 40 } 41 42 private HashMap experimentsConfiguration = new HashMap(); 43 44 public HashMap getExperimentsConfiguration() { 45 return experimentsConfiguration; 46 } 47 48 public void setExperimentsConfiguration(HashMap experimentsConfiguration) { 49 this.experimentsConfiguration = experimentsConfiguration; 40 50 } 41 51
Note: See TracChangeset
for help on using the changeset viewer.