Package org.geotools.jdbc
Class HeuristicPrimaryKeyFinder
Object
PrimaryKeyFinder
HeuristicPrimaryKeyFinder
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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPrimaryKey(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 Details
-
LOGGER
-
-
Constructor Details
-
HeuristicPrimaryKeyFinder
public HeuristicPrimaryKeyFinder()
-
-
Method Details
-
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
-