Package org.geotools.jdbc

Examples of org.geotools.jdbc.JDBCDataStore.dispose()


        sf.setAttribute("g", new GeometryFactory().createPoint( new Coordinate(2,2)));
        sf.setAttribute( "name", "two");
        fw.write();
       
        fw.close();
        ds.dispose();
    }
   
    public void testCreateDataStore() throws Exception {
        assertNull( catalog.getDataStoreByName( "gs", "acme") );
       
View Full Code Here


        Connection connection = ds.getConnection(Transaction.AUTO_COMMIT);
        connection.commit();
        Statement statement = connection.createStatement();
        statement.executeUpdate("DROP TABLE IF EXISTS " + cfg.getSchema() + "." + table );
        connection.commit();
        ds.dispose();
    }

    private long count(PostGisConfig cfg, String table) throws PostGisException, IOException, SQLException {
        DataStore ds_ = PostGISUtils.createDatastore(cfg);
        assertTrue(ds_ instanceof JDBCDataStore);
View Full Code Here

        connection.commit();
        Statement statement = connection.createStatement();
        ResultSet rs = statement.executeQuery("SELECT count(*) FROM " + cfg.getSchema() + "." + table );
        rs.next();
        long ret = rs.getLong(1);
        ds.dispose();
        return ret;
    }
}
View Full Code Here

        Connection connection = ds.getConnection(Transaction.AUTO_COMMIT);
        connection.commit();
        Statement statement = connection.createStatement();
        statement.executeUpdate("DROP TABLE IF EXISTS " + cfg.getSchema() + "." + table );
        connection.commit();
        ds.dispose();
    }

    private long count(PostGisConfig cfg, String table) throws PostGisException, IOException, SQLException {
        DataStore ds_ = PostGISUtils.createDatastore(cfg);
        assertTrue(ds_ instanceof JDBCDataStore);
View Full Code Here

        connection.commit();
        Statement statement = connection.createStatement();
        ResultSet rs = statement.executeQuery("SELECT count(*) FROM " + cfg.getSchema() + "." + table );
        rs.next();
        long ret = rs.getLong(1);
        ds.dispose();
        return ret;
    }
}
View Full Code Here

            assertTrue(store.getSQLDialect() instanceof SQLServerDialect);
           
            // force connection usage
            assertNotNull(store.getSchema("ft1"));
        } finally {
            store.dispose();
        }
    }


}
View Full Code Here

            assertTrue(store.getSQLDialect() instanceof TeradataDialect);

            // force connection usage
            assertNotNull(store.getSchema(tname("ft1")));
        } finally {
            store.dispose();
        }
    }

}
View Full Code Here

            OracleDialect dialect = (OracleDialect) store.getSQLDialect();

            // check the metadata table has been set (other tests check it's actually working)
            assertEquals("geometry_columns_test", dialect.getGeometryMetadataTable());
        } finally {
            store.dispose();
        }
    }

    private void checkCreateConnection(OracleNGDataStoreFactory factory, String dbtype) throws IOException {
        Properties db = FixtureUtilities.loadFixture("oracle");
View Full Code Here

            // check dialect
            assertTrue(store.getSQLDialect() instanceof OracleDialect);
            // force connection usage
            assertNotNull(store.getSchema(tname("ft1")));
        } finally {
            store.dispose();
        }
    }
   
   
View Full Code Here

        assertNotNull(store);
        store.createSchema(DataUtilities.createType("test", "id:String,polygonProperty:Polygon:srid=32615"));
        store.getSchema("test");
       
        // now disconnect and drop
        store.dispose();
        factory.dropDatabase(params);
       
        // try to connect again, it must fail
        params.remove(PostgisNGDataStoreFactory.CREATE_DB_IF_MISSING.key);
        try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.