org.geotools.data.postgis.fidmapper
Class VersionedFIDMapperFactory

java.lang.Object
  extended by org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory
      extended by org.geotools.data.postgis.fidmapper.VersionedFIDMapperFactory
All Implemented Interfaces:
FIDMapperFactory

public class VersionedFIDMapperFactory
extends DefaultFIDMapperFactory

A fid mapper factory that makes sure the revision attribute does not become part of the key (since users outside are unaware of it).

Since:
2.4
Author:
aaime

Nested Class Summary
 
Nested classes/interfaces inherited from class org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory
DefaultFIDMapperFactory.ColumnInfo
 
Field Summary
 
Fields inherited from class org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory
LOGGER, returnFIDColumnsAsAttributes, returningTypedFIDMapper
 
Constructor Summary
VersionedFIDMapperFactory(FIDMapperFactory unversionedFactory)
           
 
Method Summary
protected  FIDMapper buildMultiColumnFIDMapper(java.lang.String schema, java.lang.String tableName, java.sql.Connection connection, DefaultFIDMapperFactory.ColumnInfo[] colInfos)
          Builds a FID mapper for multi column public columns
protected  FIDMapper buildSingleColumnVersionedFidMapper(java.lang.String schema, java.lang.String tableName, java.sql.Connection connection, DefaultFIDMapperFactory.ColumnInfo[] colInfos)
           
 FIDMapper getMapper(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.sql.Connection connection)
          Gets the appropriate FIDMapper for the specified table.
 void setVersionedTypes(java.lang.String[] versionedTypes)
           
 
Methods inherited from class org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory
buildLastResortFidMapper, buildNoPKMapper, buildSingleColumnFidMapper, getColumnInfoList, getMapper, getPkColumnInfo, isAutoIncrement, isIntegralType, isReturningTypedFIDMapper, isTextType, setReturningTypedFIDMapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionedFIDMapperFactory

public VersionedFIDMapperFactory(FIDMapperFactory unversionedFactory)
Method Detail

setVersionedTypes

public void setVersionedTypes(java.lang.String[] versionedTypes)

getMapper

public FIDMapper getMapper(java.lang.String catalog,
                           java.lang.String schema,
                           java.lang.String tableName,
                           java.sql.Connection connection)
                    throws java.io.IOException
Gets the appropriate FIDMapper for the specified table.

Specified by:
getMapper in interface FIDMapperFactory
Overrides:
getMapper in class DefaultFIDMapperFactory
Parameters:
catalog -
schema -
tableName -
connection - the active database connection to get table key information
Returns:
the appropriate FIDMapper for the specified table.
Throws:
java.io.IOException - if any error occurs.

buildSingleColumnVersionedFidMapper

protected FIDMapper buildSingleColumnVersionedFidMapper(java.lang.String schema,
                                                        java.lang.String tableName,
                                                        java.sql.Connection connection,
                                                        DefaultFIDMapperFactory.ColumnInfo[] colInfos)

buildMultiColumnFIDMapper

protected FIDMapper buildMultiColumnFIDMapper(java.lang.String schema,
                                              java.lang.String tableName,
                                              java.sql.Connection connection,
                                              DefaultFIDMapperFactory.ColumnInfo[] colInfos)
Description copied from class: DefaultFIDMapperFactory
Builds a FID mapper for multi column public columns

Overrides:
buildMultiColumnFIDMapper in class DefaultFIDMapperFactory


Copyright © 1996-2010 Geotools. All Rights Reserved.