comparison src/main/java/de/intevation/lada/rest/QueryService.java @ 269:5143a9604fb9

Fixed variable names.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Wed, 24 Jul 2013 15:04:45 +0200
parents 58e1ed2ddbbd
children 93b12b077edf
comparison
equal deleted inserted replaced
268:58e1ed2ddbbd 269:5143a9604fb9
104 class QueryConfig { 104 class QueryConfig {
105 int id; 105 int id;
106 String name; 106 String name;
107 String description; 107 String description;
108 String sql; 108 String sql;
109 List<String> filter; 109 List<String> filters;
110 List<ResultConfig> results; 110 List<ResultConfig> results;
111 111
112 public QueryConfig() 112 public QueryConfig()
113 { 113 {
114 } 114 }
170 } 170 }
171 171
172 /** 172 /**
173 * @return the filter 173 * @return the filter
174 */ 174 */
175 public List<String> getFilter() { 175 public List<String> getFilters() {
176 return filter; 176 return filters;
177 } 177 }
178 178
179 /** 179 /**
180 * @param filter the filter to set 180 * @param filter the filter to set
181 */ 181 */
182 public void setFilter(List<String> filter) { 182 public void setFilters(List<String> filters) {
183 this.filter = filter; 183 this.filters = filters;
184 } 184 }
185 185
186 /** 186 /**
187 * @return the results 187 * @return the results
188 */ 188 */
264 qc1.setId(1); 264 qc1.setId(1);
265 qc1.setName("MST, UWB"); 265 qc1.setName("MST, UWB");
266 qc1.setDescription("Das ist die Beschreibung von Abfrage 1"); 266 qc1.setDescription("Das ist die Beschreibung von Abfrage 1");
267 qc1.setSql("Select * from l_probe"); 267 qc1.setSql("Select * from l_probe");
268 List<String> filters = new ArrayList<String>(); 268 List<String> filters = new ArrayList<String>();
269 filters.add("mst"); 269 filters.add("mstId");
270 qc1.setFilter(filters); 270 filters.add("umwId");
271 qc1.setFilters(filters);
271 List<ResultConfig> results = new ArrayList<ResultConfig>(); 272 List<ResultConfig> results = new ArrayList<ResultConfig>();
272 results.add(new ResultConfig("datenbasisId","Datenbases")); 273 results.add(new ResultConfig("datenbasisId","Datenbasis"));
273 results.add(new ResultConfig("mplId","MPL")); 274 results.add(new ResultConfig("mplId","MPL"));
274 results.add(new ResultConfig("umwId","UWB")); 275 results.add(new ResultConfig("umwId","UWB"));
275 results.add(new ResultConfig("messmethode","MMT")); 276 results.add(new ResultConfig("messmethode","MMT"));
276 results.add(new ResultConfig("hauptprobenNr","HPNR")); 277 results.add(new ResultConfig("hauptprobenNr","HPNR"));
277 results.add(new ResultConfig("nebenprobenNr","NPNR")); 278 results.add(new ResultConfig("nebenprobenNr","NPNR"));
278 results.add(new ResultConfig("bezeichnung","E.Gemeinde")); 279 results.add(new ResultConfig("bezeichnung","E.Gemeinde"));
279 results.add(new ResultConfig("kreis","Ursprungsgemeinde")); 280 results.add(new ResultConfig("kreis","Ursprungsgemeinde"));
280 results.add(new ResultConfig("probeId","ProbeID")); 281 results.add(new ResultConfig("probeId","ProbeID",1));
281 results.add(new ResultConfig("mstId","MS")); 282 results.add(new ResultConfig("mstId","MS"));
282 qc1.setResults(results); 283 qc1.setResults(results);
283 configs.add(qc1); 284 configs.add(qc1);
284 /* Query 2 */ 285 /* Query 2 */
285 QueryConfig qc2 = new QueryConfig(); 286 QueryConfig qc2 = new QueryConfig();
286 qc2.setId(2); 287 qc2.setId(2);
287 qc2.setName("Test"); 288 qc2.setName("Einfach");
288 qc2.setDescription("Das ist die Beschreibung von Abfrage 2"); 289 qc2.setDescription("Einfache Abfrage aller Proben ohne weitere Filterung.");
289 qc2.setSql("Select * from l_probe"); 290 qc2.setSql("Select * from l_probe");
290 List<String> qcf2= new ArrayList<String>(); 291 List<String> qcf2= new ArrayList<String>();
291 qcf2.add("mst"); 292 qc2.setFilters(qcf2);
292 qc2.setFilter(qcf2);
293 List<ResultConfig> qcr2= new ArrayList<ResultConfig>(); 293 List<ResultConfig> qcr2= new ArrayList<ResultConfig>();
294 qcr2.add(new ResultConfig("mst","Messstelle")); 294 qcr2.add(new ResultConfig("datenbasisId","Datenbasis"));
295 qcr2.add(new ResultConfig("nebenprobenNr","NPNR"));
296 qcr2.add(new ResultConfig("hauptprobenNr","HPNR"));
297 qcr2.add(new ResultConfig("mstId","MS"));
298 qcr2.add(new ResultConfig("probeId","ProbeID",1));
295 qc2.setResults(qcr2); 299 qc2.setResults(qcr2);
296 configs.add(qc2); 300 configs.add(qc2);
297 return configs; 301 return configs;
298 } 302 }
299 } 303 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)