Package org.geotools.jdbc
Class HeuristicPrimaryKeyFinder
- Object
-
- PrimaryKeyFinder
-
- HeuristicPrimaryKeyFinder
-
public class HeuristicPrimaryKeyFinder extends PrimaryKeyFinder
Looks up the primary key using theDatabaseMetaDatafor 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
-
-
Constructor Summary
Constructors Constructor Description HeuristicPrimaryKeyFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrimaryKeygetPrimaryKey(JDBCDataStore store, String databaseSchema, String tableName, Connection cx)Returns thePrimaryKey, ornullif a specific type could not be determined (the datastore will fall back onNullPrimaryKeyin that case.
-
-
-
Field Detail
-
LOGGER
protected static final Logger LOGGER
-
-
Method Detail
-
getPrimaryKey
public PrimaryKey getPrimaryKey(JDBCDataStore store, String databaseSchema, String tableName, Connection cx) throws SQLException
Description copied from class:PrimaryKeyFinderReturns thePrimaryKey, ornullif a specific type could not be determined (the datastore will fall back onNullPrimaryKeyin that case. It is advised to return- Specified by:
getPrimaryKeyin classPrimaryKeyFinder- Throws:
SQLException
-
-