Mercurial > dive4elements > gnv-client
diff geo-backend/src/test/java/de/intevation/gnv/geobackend/base/query/GroupBySample.java @ 885:1c3efbd2fc5a
Removes trailing whitespace.
geo-backend/trunk@850 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 29 Mar 2010 07:49:16 +0000 |
parents | 0ee3c0ed40e4 |
children | ebeb56428409 |
line wrap: on
line diff
--- a/geo-backend/src/test/java/de/intevation/gnv/geobackend/base/query/GroupBySample.java Fri Mar 26 15:23:03 2010 +0000 +++ b/geo-backend/src/test/java/de/intevation/gnv/geobackend/base/query/GroupBySample.java Mon Mar 29 07:49:16 2010 +0000 @@ -15,22 +15,22 @@ public class GroupBySample { - + public void executeQuery(SeConnection con, String[] pLayername, String pSpatialColumnName, String pWhere, SDEPoint[] g, String[] pReturnFields, String byClause) { - + try { // get the layer for querying - + SeShapeFilter[] filters = null; if (g != null){ SeLayer lLayer = new SeLayer(con, pLayername[0], pSpatialColumnName); SeShape shape = new SeShape(); shape.setCoordRef(lLayer.getCoordRef()); - - - + + + shape.generatePolygon(g.length, 1, null, g); SeShapeFilter filter = new SeShapeFilter(pLayername[0], pSpatialColumnName, shape, SeFilter.METHOD_AI); @@ -41,14 +41,14 @@ SeQuery spatialQuery = null; SeSqlConstruct sqlCons = new SeSqlConstruct(pLayername, pWhere); spatialQuery = new SeQuery(con); - + SeQueryInfo queryInfo = new SeQueryInfo(); queryInfo.setColumns(pReturnFields); - + if (byClause != null){ queryInfo.setByClause(byClause); } - + queryInfo.setConstruct(sqlCons); spatialQuery.prepareQueryInfo(queryInfo); @@ -68,29 +68,29 @@ if (lCount == 0) { // analyze cols of result set SeColumnDefinition[] lCols = row.getColumns(); - + } short lNumCols = row.getNumColumns(); - + for (int i = 0; i < lNumCols; i++) { System.out.println(row.getObject(i)); } - + } spatialQuery.close(); - } catch (Exception e){ + } catch (Exception e){ e.printStackTrace(); } - + } - - + + /** * @param args */ public static void main(String[] args) { - + try { String[] layerNames = new String[] { "median.meshpoint", "median.mesh" }; String spatialColumnName = "SHAPE"; @@ -109,13 +109,13 @@ String database = ""; String username = ""; String credentials = ""; - SeConnection con = new SeConnection(server, port, + SeConnection con = new SeConnection(server, port, database, username, credentials); new GroupBySample().executeQuery(con, layerNames, spatialColumnName, where, g, returnFields, byClause); - - + + } catch (SeException e) { e.printStackTrace(); }