org.geotools.data.postgis.fidmapper
Class PostgisFIDMapperFactory

java.lang.Object
  extended byorg.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory
      extended byorg.geotools.data.postgis.fidmapper.PostgisFIDMapperFactory
All Implemented Interfaces:
FIDMapperFactory

public class PostgisFIDMapperFactory
extends DefaultFIDMapperFactory

Postgis specific FIDMapperFactory that uses the OIDFidMapper to map tables with no primary keys or tables that have weird primary keys that cannot be mapped in other ways.

Author:
Andrea Aime

Nested Class Summary
 
Nested classes inherited from class org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory
DefaultFIDMapperFactory.ColumnInfo
 
Field Summary
 
Fields inherited from class org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory
returnFIDColumnsAsAttributes
 
Constructor Summary
PostgisFIDMapperFactory()
           
 
Method Summary
protected  FIDMapper buildLastResortFidMapper(java.lang.String schema, java.lang.String tableName, java.sql.Connection connection, DefaultFIDMapperFactory.ColumnInfo[] colInfos)
          Builds a FidMapper when every other tentative of building one fails.
protected  FIDMapper buildNoPKMapper(java.lang.String schema, java.lang.String tableName, java.sql.Connection connection)
          DOCUMENT ME!
protected  boolean isAutoIncrement(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.sql.Connection conn, java.sql.ResultSet tableInfo, java.lang.String columnName, int dataType)
          see@DefaultFIDMapperFactory in main module (jdbc) This version pre-double quotes the column name and table name and passes it to the superclass's version.
 
Methods inherited from class org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory
buildMultiColumnFIDMapper, buildSingleColumnFidMapper, getColumnInfoList, getMapper, getMapper, getPkColumnInfo, isIntegralType, isTextType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgisFIDMapperFactory

public PostgisFIDMapperFactory()
Method Detail

buildNoPKMapper

protected FIDMapper buildNoPKMapper(java.lang.String schema,
                                    java.lang.String tableName,
                                    java.sql.Connection connection)
Description copied from class: DefaultFIDMapperFactory
DOCUMENT ME!

Overrides:
buildNoPKMapper in class DefaultFIDMapperFactory
Parameters:
schema -
tableName -
connection -
Returns:

buildLastResortFidMapper

protected FIDMapper buildLastResortFidMapper(java.lang.String schema,
                                             java.lang.String tableName,
                                             java.sql.Connection connection,
                                             DefaultFIDMapperFactory.ColumnInfo[] colInfos)
Description copied from class: DefaultFIDMapperFactory
Builds a FidMapper when every other tentative of building one fails. This method is used as a last resort fall back, use it if you can provide a FIDMapper that works on every kind of table, but it's usually suboptimal. The default behaviour is to return no FID mapper at all.

Overrides:
buildLastResortFidMapper in class DefaultFIDMapperFactory
Parameters:
schema -
tableName -
connection -
colInfos -
Returns:

isAutoIncrement

protected boolean isAutoIncrement(java.lang.String catalog,
                                  java.lang.String schema,
                                  java.lang.String tableName,
                                  java.sql.Connection conn,
                                  java.sql.ResultSet tableInfo,
                                  java.lang.String columnName,
                                  int dataType)
                           throws java.sql.SQLException
see@DefaultFIDMapperFactory in main module (jdbc) This version pre-double quotes the column name and table name and passes it to the superclass's version.

Overrides:
isAutoIncrement in class DefaultFIDMapperFactory
Parameters:
catalog -
schema -
tableName -
conn -
tableInfo -
columnName -
dataType -
Returns:
Throws:
java.sql.SQLException


Copyright © GeoTools. All Rights Reserved.