org.geotools.data.db2
Class DB2AutoIncrementFIDMapper

Object
  extended by AbstractFIDMapper
      extended by AutoIncrementFIDMapper
          extended by DB2AutoIncrementFIDMapper
All Implemented Interfaces:
Serializable, FIDMapper

public class DB2AutoIncrementFIDMapper
extends AutoIncrementFIDMapper

Overrides AutoIncrementFIDMapper methods for DB2-specific handling.

Author:
David Adler - IBM Corporation
See Also:
Serialized Form

Field Summary
 
Fields inherited from class AbstractFIDMapper
autoIncrement, colDecimalDigits, colNames, colSizes, colTypes, returnFIDColumnsAsAttributes, tableName, tableSchemaName
 
Constructor Summary
DB2AutoIncrementFIDMapper(String databaseSchemaName, String tableName, String colName, int dataType)
          Default constructor.
 
Method Summary
 String createID(Connection conn, SimpleFeature feature, Statement statement)
          Creates a new ID for a feature.
 
Methods inherited from class AutoIncrementFIDMapper
getID, getPKAttributes, isValid
 
Methods inherited from class AbstractFIDMapper
getColumnCount, getColumnDecimalDigits, getColumnDecimalDigits, getColumnName, getColumnName, getColumnSize, getColumnSize, getColumnType, getColumnType, getTableName, getTableSchemaName, hasAutoIncrementColumns, initSupportStructures, isAutoIncrement, isAutoIncrement, isVolatile, returnFIDColumnsAsAttributes, setInfo, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DB2AutoIncrementFIDMapper

public DB2AutoIncrementFIDMapper(String databaseSchemaName,
                                 String tableName,
                                 String colName,
                                 int dataType)
Default constructor.

Method Detail

createID

public String createID(Connection conn,
                       SimpleFeature feature,
                       Statement statement)
                throws IOException
Description copied from interface: FIDMapper
Creates a new ID for a feature.
This is done either by querying the database (for auto-increment like types, for example sequences) or by inspecting the Feature (for example, for primary keys with business meaning that whose attributes are included in the Feature ones).

Specified by:
createID in interface FIDMapper
Overrides:
createID in class AutoIncrementFIDMapper
Parameters:
conn - - the database connection
feature - - the feature that needs the new FID
statement - - the statement used to insert the feature into the database
Throws:
IOException
See Also:
org.geotools.data.jdbc.fidmapper.FIDMapper#createID(java.sql.Connection, org.geotools.feature.Feature, Statement)


Copyright © 1996-2009 Geotools. All Rights Reserved.