| java.lang.Object org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory org.geotools.data.db2.DB2FIDMapperFactory
DB2FIDMapperFactory | public class DB2FIDMapperFactory extends DefaultFIDMapperFactory (Code) | | Overrides DefaultFIDMapperFactory methods for DB2-specific handling.
author: David Adler - IBM Corporation |
Constructor Summary | |
public | DB2FIDMapperFactory(String databaseSchemaName) Default constructor will cause FID columns to be returned as business
attributes. | public | DB2FIDMapperFactory(boolean returnFIDColumnsAsAttributes) Constructs a DB2FIDMapperFactory with user specification of whether to
return FID columns as business attributes. |
Method Summary | |
protected FIDMapper | buildNoPKMapper(String schema, String tableName, Connection connection) Returns a DB2NullFIDMapper when there is no primary key.
Parameters: schema - ignored. Parameters: tableName - ignored. Parameters: connection - ignored. | protected FIDMapper | buildSingleColumnFidMapper(String schema, String tableName, Connection connection, ColumnInfo ci) Builds a FID mapper based on a single column primary key. | public FIDMapper | getMapper(String catalog, String schema, String tableName, Connection connection) Gets the appropriate FIDMapper for the specified table. | protected boolean | isAutoIncrement(String catalog, String schema, String tableName, Connection conn, ResultSet tableInfo, String columnName, int dataType) Determine whether this column is autoincrement. | String | toString(FIDMapper fm) |
DB2FIDMapperFactory | public DB2FIDMapperFactory(String databaseSchemaName)(Code) | | Default constructor will cause FID columns to be returned as business
attributes.
|
DB2FIDMapperFactory | public DB2FIDMapperFactory(boolean returnFIDColumnsAsAttributes)(Code) | | Constructs a DB2FIDMapperFactory with user specification of whether to
return FID columns as business attributes.
Parameters: returnFIDColumnsAsAttributes - true if FID columns should bereturned as business attributes. |
buildNoPKMapper | protected FIDMapper buildNoPKMapper(String schema, String tableName, Connection connection)(Code) | | Returns a DB2NullFIDMapper when there is no primary key.
Parameters: schema - ignored. Parameters: tableName - ignored. Parameters: connection - ignored. a DB2NullFIDMapper. |
buildSingleColumnFidMapper | protected FIDMapper buildSingleColumnFidMapper(String schema, String tableName, Connection connection, ColumnInfo ci)(Code) | | Builds a FID mapper based on a single column primary key. Default
version tries the auto-increment way, then a mapping on an
MaxIncFIDMapper type for numeric columns, and a plain
BasicFIDMapper of text based columns.
Parameters: schema - Parameters: tableName - Parameters: connection - not used Parameters: ci - the column information a FIDMapper |
getMapper | public FIDMapper getMapper(String catalog, String schema, String tableName, Connection connection) throws IOException(Code) | | Gets the appropriate FIDMapper for the specified table.
Parameters: catalog - Parameters: schema - Parameters: tableName - Parameters: connection - the active database connection to get table keyinformation the appropriate FIDMapper for the specified table. throws: IOException - if any error occurs. |
isAutoIncrement | protected boolean isAutoIncrement(String catalog, String schema, String tableName, Connection conn, ResultSet tableInfo, String columnName, int dataType) throws SQLException(Code) | | Determine whether this column is autoincrement. An open connection to
the database must be provided.
Parameters: catalog - not used Parameters: schema - not used Parameters: tableName - the table name Parameters: conn - an open database connection Parameters: tableInfo - not used Parameters: columnName - the FID column name Parameters: dataType - not used true if this is an autoincrement column throws: SQLException - |
toString | String toString(FIDMapper fm)(Code) | | Create a nice string representation of a FID Mapper
Parameters: fm - the FID Mapper the String representation |
Methods inherited from org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory | protected FIDMapper buildLastResortFidMapper(String schema, String tableName, Connection connection, ColumnInfo[] colInfos)(Code)(Java Doc) protected FIDMapper buildMultiColumnFIDMapper(String schema, String tableName, Connection connection, ColumnInfo[] colInfos)(Code)(Java Doc) protected FIDMapper buildNoPKMapper(String schema, String tableName, Connection connection)(Code)(Java Doc) protected FIDMapper buildSingleColumnFidMapper(String schema, String tableName, Connection connection, ColumnInfo ci)(Code)(Java Doc) protected List getColumnInfoList(ColumnInfo[] colInfos)(Code)(Java Doc) public FIDMapper getMapper(String catalog, String schema, String tableName, Connection connection) throws IOException(Code)(Java Doc) public FIDMapper getMapper(FeatureType featureType)(Code)(Java Doc) protected ColumnInfo[] getPkColumnInfo(String catalog, String schema, String typeName, Connection conn) throws SchemaNotFoundException, DataSourceException(Code)(Java Doc) protected boolean isAutoIncrement(String catalog, String schema, String tableName, Connection conn, ResultSet tableInfo, String columnName, int dataType) throws SQLException(Code)(Java Doc) protected boolean isIntegralType(int dataType)(Code)(Java Doc) public boolean isReturningTypedFIDMapper()(Code)(Java Doc) protected boolean isTextType(int dataType)(Code)(Java Doc) public void setReturningTypedFIDMapper(boolean returningTypedFIDMapper)(Code)(Java Doc)
|
|
|