01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2005-2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2005, Institut de Recherche pour le Développement
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.referencing.factory.epsg;
18:
19: // J2SE dependencies and extensions
20: import java.sql.Connection;
21: import java.sql.PreparedStatement;
22:
23: // Geotools dependencies
24: import org.geotools.factory.Hints;
25:
26: /**
27: * A coordinate reference system factory backed by the EPSG database tables.
28: *
29: * @since 2.1
30: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/FactoryUsingSQL.java $
31: * @version $Id: FactoryUsingSQL.java 26328 2007-07-24 16:57:19Z desruisseaux $
32: * @author Jody Garnett
33: *
34: * @deprecated Please use {@link AccessDialectEpsgFactory}.
35: */
36: public class FactoryUsingSQL extends DirectEpsgFactory {
37: /**
38: * Constructs an authority factory using the specified connection.
39: *
40: * @param userHints The underlying factories used for objects creation.
41: * @param connection The connection to the underlying EPSG database.
42: *
43: * @since 2.2
44: */
45: public FactoryUsingSQL(final Hints userHints,
46: final Connection connection) {
47: super (userHints, connection);
48: }
49:
50: /**
51: * Invoked when a new {@link PreparedStatement} is about to be created from a SQL string.
52: *
53: * Since the <A HREF="http://www.epsg.org">EPSG database</A> is available mainly in MS-Access
54: * format, and this is the target of our super class, we have no work to do here.
55: *
56: * @param statement The statement in MS-Access syntax.
57: * @return The SQL statement to use. This implementation returns the string unchanged.
58: */
59: protected String adaptSQL(final String statement) {
60: return statement;
61: }
62: }
|