org.geotools.jdbc
Class HeuristicPrimaryKeyFinder
java.lang.Object
org.geotools.jdbc.PrimaryKeyFinder
org.geotools.jdbc.HeuristicPrimaryKeyFinder
public class HeuristicPrimaryKeyFinder
- extends PrimaryKeyFinder
Looks up the primary key using the DatabaseMetaData
for the specified table, looking both
for primary keys and unique indexes. The sequence lookup is performed in conjuction with the sql
dialect
- Author:
- Andrea Aime - OpenGeo
Field Summary |
protected static java.util.logging.Logger |
LOGGER
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
protected static final java.util.logging.Logger LOGGER
HeuristicPrimaryKeyFinder
public HeuristicPrimaryKeyFinder()
getPrimaryKey
public PrimaryKey getPrimaryKey(JDBCDataStore store,
java.lang.String databaseSchema,
java.lang.String tableName,
java.sql.Connection cx)
throws java.sql.SQLException
- Description copied from class:
PrimaryKeyFinder
- Returns the
PrimaryKey
, or null
if a specific type could not be determined
(the datastore will fall back on NullPrimaryKey
in that case. It is advised to return
- Specified by:
getPrimaryKey
in class PrimaryKeyFinder
- Returns:
-
- Throws:
java.sql.SQLException
Copyright © 1996-2010 Geotools. All Rights Reserved.