|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDefaultFIDMapperFactory
DB2FIDMapperFactory
public class DB2FIDMapperFactory
Overrides DefaultFIDMapperFactory methods for DB2-specific handling.
modules/plugin/db2 (gt-db2.jar)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class DefaultFIDMapperFactory |
---|
DefaultFIDMapperFactory.ColumnInfo |
Field Summary |
---|
Fields inherited from class DefaultFIDMapperFactory |
---|
returnFIDColumnsAsAttributes, returningTypedFIDMapper |
Constructor Summary | |
---|---|
DB2FIDMapperFactory(boolean returnFIDColumnsAsAttributes)
Constructs a DB2FIDMapperFactory with user specification of whether to return FID columns as business attributes. |
|
DB2FIDMapperFactory(String databaseSchemaName)
Default constructor will cause FID columns to be returned as business attributes. |
Method Summary | |
---|---|
protected FIDMapper |
buildNoPKMapper(String schema,
String tableName,
Connection connection)
Returns a DB2NullFIDMapper when there is no primary key. |
protected FIDMapper |
buildSingleColumnFidMapper(String schema,
String tableName,
Connection connection,
DefaultFIDMapperFactory.ColumnInfo ci)
Builds a FID mapper based on a single column primary key. |
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. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DB2FIDMapperFactory(String databaseSchemaName)
public DB2FIDMapperFactory(boolean returnFIDColumnsAsAttributes)
returnFIDColumnsAsAttributes
- true if FID columns should be
returned as business attributes.Method Detail |
---|
public FIDMapper getMapper(String catalog, String schema, String tableName, Connection connection) throws IOException
getMapper
in interface FIDMapperFactory
getMapper
in class DefaultFIDMapperFactory
catalog
- schema
- tableName
- connection
- the active database connection to get table key
information
IOException
- if any error occurs.protected boolean isAutoIncrement(String catalog, String schema, String tableName, Connection conn, ResultSet tableInfo, String columnName, int dataType) throws SQLException
isAutoIncrement
in class DefaultFIDMapperFactory
catalog
- not usedschema
- not usedtableName
- the table nameconn
- an open database connectiontableInfo
- not usedcolumnName
- the FID column namedataType
- not used
SQLException
protected FIDMapper buildNoPKMapper(String schema, String tableName, Connection connection)
buildNoPKMapper
in class DefaultFIDMapperFactory
schema
- ignored.tableName
- ignored.connection
- ignored.
protected FIDMapper buildSingleColumnFidMapper(String schema, String tableName, Connection connection, DefaultFIDMapperFactory.ColumnInfo ci)
MaxIncFIDMapper
type for numeric columns, and a plain BasicFIDMapper
of text based columns.
buildSingleColumnFidMapper
in class DefaultFIDMapperFactory
schema
- tableName
- connection
- not usedci
- the column information
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |