org.geotools.data.db2
Class DB2NullFIDMapper

Object
  extended by AbstractFIDMapper
      extended by NullFIDMapper
          extended by DB2NullFIDMapper
All Implemented Interfaces:
Serializable, FIDMapper

public class DB2NullFIDMapper
extends NullFIDMapper

Overrides NullFIDMapper methods for DB2-specific handling.

Author:
David Adler - IBM Corporation
See Also:
Serialized Form
Module:
modules/plugin/db2 (gt-db2.jar)

Field Summary
 
Fields inherited from class AbstractFIDMapper
autoIncrement, colDecimalDigits, colNames, colSizes, colTypes, returnFIDColumnsAsAttributes, tableName, tableSchemaName
 
Constructor Summary
DB2NullFIDMapper()
          Default constructor.
DB2NullFIDMapper(String tableSchemaName, String tableName)
          Constructor to set schema and table name for Null mapper.
 
Method Summary
 String getID(Object[] attributes)
          Returns the FID given the values of the prymary key attributes
 boolean isValid(String fid)
          Provides a simple means of assessing if a feature id is structurally valid with respect to the fids this FIDMapper creates.
 
Methods inherited from class NullFIDMapper
createID, getPKAttributes, isVolatile
 
Methods inherited from class AbstractFIDMapper
getColumnCount, getColumnDecimalDigits, getColumnDecimalDigits, getColumnName, getColumnName, getColumnSize, getColumnSize, getColumnType, getColumnType, getTableName, getTableSchemaName, hasAutoIncrementColumns, initSupportStructures, isAutoIncrement, isAutoIncrement, returnFIDColumnsAsAttributes, setInfo, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DB2NullFIDMapper

public DB2NullFIDMapper()
Default constructor.


DB2NullFIDMapper

public DB2NullFIDMapper(String tableSchemaName,
                        String tableName)
Constructor to set schema and table name for Null mapper.

Parameters:
tableSchemaName -
tableName -
Method Detail

getID

public String getID(Object[] attributes)
Description copied from interface: FIDMapper
Returns the FID given the values of the prymary key attributes

Specified by:
getID in interface FIDMapper
Overrides:
getID in class NullFIDMapper
Parameters:
attributes - DOCUMENT ME!
See Also:
FIDMapper.getID(java.lang.Object[])

isValid

public boolean isValid(String fid)
Description copied from interface: FIDMapper
Provides a simple means of assessing if a feature id is structurally valid with respect to the fids this FIDMapper creates.

The primary purpose of this method is to help in filtering out fids from filters that are not appropriate for a given FeatureType but that may otherwise being treated as valid if they get down to the actual SQL query.

The validity check may be as strict or as loose as the concrete FIDMapper wishes, since there may be cases where whether a fid in a filter is valid or not is not that important, or where it may result in deleting a Feature that was not expected to be deleted.

An example of such a need for validation may be a feature id composed like <featureTypeName>.<number>, where the actual table PK is just the <number> part. If a request over the FeatureType "ft1" is made with a fid filter like ft2.1, this method can ensure the number 1 is not send out in the SQL query at all.

Specified by:
isValid in interface FIDMapper
Overrides:
isValid in class NullFIDMapper
Parameters:
fid - a feature id to check for structural validity
Returns:
true if fid is an integer, false othwerwise
See Also:
FIDMapper.isValid(String)


Copyright © 1996-2009 Geotools. All Rights Reserved.