annotate geo-backend/src/test/java/de/intevation/gnv/geobackend/base/query/QueryExecutorTestCase.java @ 274:ff1b7967e6b9

General CodecCleanup: Remove deprecated TODOS. Replaced Tabs against whitespaces Organize some Imports geo-backend/trunk@280 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 02 Nov 2009 10:53:06 +0000
parents db8920c5346d
children 9063c5fcebf7
rev   line source
132
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 /**
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2 *
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
3 */
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
4 package de.intevation.gnv.geobackend.base.query;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
5
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
6 import java.io.FileInputStream;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
7 import java.io.InputStream;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
8 import java.util.Collection;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 import java.util.Iterator;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
10 import java.util.Properties;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12 import org.apache.log4j.BasicConfigurator;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13 import org.apache.log4j.Logger;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
14
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15 import de.intevation.gnv.geobackend.base.Result;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16 import de.intevation.gnv.geobackend.base.ResultDescriptor;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17 import de.intevation.gnv.geobackend.base.connectionpool.ConnectionPoolFactory;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18 import de.intevation.gnv.geobackend.base.query.container.QueryContainerFactory;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19 import de.intevation.gnv.geobackend.base.query.exception.QueryException;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20 import junit.framework.TestCase;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
21
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22 /**
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23 * TestCase for the QueryExecutor interface
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24 * @author Tim Englich <tim.englich@intevation.de>
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
25 *
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
26 */
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
27 public class QueryExecutorTestCase extends TestCase {
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
28
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
29
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
30 /**
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
31 * the logger, used to log exceptions and additonaly information
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32 */
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 private static Logger log = null;
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 static{
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36 BasicConfigurator.configure();
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 log = Logger.getLogger(QueryExecutorTestCase.class);
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38 }
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
40 /**
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 * Constructor
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42 * @param name
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 */
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 public QueryExecutorTestCase(String name) {
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45 super(name);
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 }
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47
139
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
48
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
49 public void testSpatialQuery(){
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
50 try {
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
51
264
5bbdbc0bbddc Added SFS-Support to ArcSDE-Query-Part
Tim Englich <tim.englich@intevation.de>
parents: 139
diff changeset
52 this.testQuery(5, "spatial_query", null);
139
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
53 } catch (QueryException e) {
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
54 log.error(e,e);
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
55 fail();
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
56 }
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
57 }
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
58
266
1530890b28c9 Added SFS-Support to ArcSDE-Query-Part without any Spatial restriction in the where clause
Tim Englich <tim.englich@intevation.de>
parents: 264
diff changeset
59 public void testSpatialQueryWithoutIntersects(){
1530890b28c9 Added SFS-Support to ArcSDE-Query-Part without any Spatial restriction in the where clause
Tim Englich <tim.englich@intevation.de>
parents: 264
diff changeset
60 try {
274
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
61 // this.testQuery(286, "spatial_query_without_intersects", null);
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
62 this.testQuery(0, "spatial_query_without_intersects2", null);
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
63 this.testQuery(2060, "spatial_query_without_intersects3", null);
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
64 this.testQuery(0, "spatial_query_without_intersects4", null);
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
65 this.testQuery(27031, "spatial_query_without_intersects5", null);
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
66 this.testQuery(8464, "spatial_query_without_intersects6", null);
266
1530890b28c9 Added SFS-Support to ArcSDE-Query-Part without any Spatial restriction in the where clause
Tim Englich <tim.englich@intevation.de>
parents: 264
diff changeset
67 } catch (QueryException e) {
1530890b28c9 Added SFS-Support to ArcSDE-Query-Part without any Spatial restriction in the where clause
Tim Englich <tim.englich@intevation.de>
parents: 264
diff changeset
68 log.error(e,e);
1530890b28c9 Added SFS-Support to ArcSDE-Query-Part without any Spatial restriction in the where clause
Tim Englich <tim.englich@intevation.de>
parents: 264
diff changeset
69 fail();
1530890b28c9 Added SFS-Support to ArcSDE-Query-Part without any Spatial restriction in the where clause
Tim Englich <tim.englich@intevation.de>
parents: 264
diff changeset
70 }
1530890b28c9 Added SFS-Support to ArcSDE-Query-Part without any Spatial restriction in the where clause
Tim Englich <tim.englich@intevation.de>
parents: 264
diff changeset
71 }
1530890b28c9 Added SFS-Support to ArcSDE-Query-Part without any Spatial restriction in the where clause
Tim Englich <tim.englich@intevation.de>
parents: 264
diff changeset
72
139
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
73
132
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
74 /**
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
75 * Tests if the Databaseconnection can be established and
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
76 * Data could be read from the Database
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
77 */
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
78 public void testQueryExecutor(){
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
79
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
80 try {
133
56655046194f Fix Bug setting the Filtervalues into the Statement.
Tim Englich <tim.englich@intevation.de>
parents: 132
diff changeset
81
139
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
82 this.testQuery(6, "mesh", null);
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
83
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
84 this.testQuery(1, "mesh_id", new String[]{"5"});
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
85
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
86
133
56655046194f Fix Bug setting the Filtervalues into the Statement.
Tim Englich <tim.englich@intevation.de>
parents: 132
diff changeset
87
132
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
88 } catch (QueryException e) {
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
89 log.error(e,e);
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
90 fail();
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
91 }
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
92 }
139
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
93
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
94 public void testTimeSeriesQueries(){
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
95
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
96 try{
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
97 // Test zum initialisieren der umgebung
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
98 this.testQuery(6, "mesh", null);
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
99
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
100
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
101 this.testQuery(11, "timeseries_stations", new String[]{"4"});
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
102 this.testQuery(11, "timeseries_stations_op", new String[]{"4"});
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
103 this.testQuery(1, "timeseries_interval", new String[]{"500042 ", "54"});
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
104
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
105 } catch (QueryException e) {
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
106 log.error(e,e);
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
107 fail();
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
108 }
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
109
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
110 }
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
111
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
112 /**
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
113 * @param resultsize
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
114 * @param queryID
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
115 * @param filter
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
116 * @throws QueryException
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
117 */
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
118 private void testQuery(int resultsize, String queryID, String[] filter)
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
119 throws QueryException {
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
120 long start = System.currentTimeMillis();
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
121 QueryExecutor queryExecutor = QueryExecutorFactory.getInstance().getQueryExecutor();
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
122 Collection<Result> results = queryExecutor.executeQuery(queryID, filter);
274
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
123 // if (results == null || results.size() == 0){
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
124 // log.error("Keine Daten erhalten");
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
125 // fail();
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
126 // }else {
139
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
127 assertEquals(resultsize, results.size());
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
128 log.debug(resultsize+" Datens�tze erhalten");
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
129 Iterator<Result> it = results.iterator();
274
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
130 // while (it.hasNext()){
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
131 // Result tmpResult = it.next();
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
132 // ResultDescriptor resultDescriptor = tmpResult.getResultDescriptor();
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
133 // int columns = resultDescriptor.getColumnCount();
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
134 // for (int i = 0; i < columns; i++){
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
135 // String columnName = resultDescriptor.getColumnName(i);
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
136 // Object value = tmpResult.getString(columnName);
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
137 // log.debug(columnName + " ==> "+value.toString());
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
138 // }
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
139 // }
ff1b7967e6b9 General CodecCleanup:
Tim Englich <tim.englich@intevation.de>
parents: 269
diff changeset
140 // }
139
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
141 log.debug("Query dauerte: "+(System.currentTimeMillis()-start) +"ms");
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
142 }
9f2eaefe9dd4 Some Log Messages Added.
Tim Englich <tim.englich@intevation.de>
parents: 133
diff changeset
143
132
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
144
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
145
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
146 /**
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
147 * @see junit.framework.TestCase#setUp()
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
148 */
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
149 @Override
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
150 protected void setUp() throws Exception {
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
151
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
152 super.setUp();
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
153 InputStream inputStream = new FileInputStream("src/test/ressources/ArcSDEConnectionPoolTestCase.properties");
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
154 Properties properties = new Properties();
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
155 properties.load(inputStream);
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
156
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
157 ConnectionPoolFactory cpf = ConnectionPoolFactory.getInstance();
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
158 cpf.initializeConnectionPool(properties);
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
159
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
160
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
161 inputStream = new FileInputStream("src/test/ressources/QueryExecutorTestCase.properties");
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
162 properties = new Properties();
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
163 properties.load(inputStream);
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
164
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
165 QueryContainerFactory qcf = QueryContainerFactory.getInstance();
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
166 qcf.initializeQueryContainer(properties);
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
167 }
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
168
5a583cff97ea Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
169 }

http://dive4elements.wald.intevation.org