org.apache.cayenne.dba.db2
Class DB2Adapter

java.lang.Object
  extended by org.apache.cayenne.dba.JdbcAdapter
      extended by org.apache.cayenne.dba.db2.DB2Adapter
All Implemented Interfaces:
DbAdapter

public class DB2Adapter
extends JdbcAdapter

DbAdapter implementation for the DB2 RDBMS . Sample connection settings to use with DB2 are shown below:

 
      test-db2.cayenne.adapter = org.apache.cayenne.dba.db2.DB2Adapter
      test-db2.jdbc.username = test
      test-db2.jdbc.password = secret
      test-db2.jdbc.url = jdbc:db2://servername:50000/databasename
      test-db2.jdbc.driver = com.ibm.db2.jcc.DB2Driver
  
 

Author:
Holger Hoffstaette

Field Summary
 
Fields inherited from class org.apache.cayenne.dba.JdbcAdapter
extendedTypes, pkGenerator, supportsBatchUpdates, supportsFkConstraints, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler
 
Constructor Summary
DB2Adapter()
           
 
Method Summary
protected  void configureExtendedTypes(ExtendedTypeMap map)
          Installs appropriate ExtendedTypes as converters for passing values between JDBC and Java layers.
protected  PkGenerator createPkGenerator()
          Creates a DB2 specific PK Generator.
 java.lang.String createTable(DbEntity ent)
          Returns a SQL string that can be used to create database table corresponding to ent parameter.
 SQLAction getAction(Query query, DataNode node)
          Uses DB2ActionBuilder to create the right action.
 QualifierTranslator getQualifierTranslator(QueryAssembler queryAssembler)
          Returns a trimming translator.
 
Methods inherited from class org.apache.cayenne.dba.JdbcAdapter
bindParameter, buildAttribute, createDataNode, createFkConstraint, createTableAppendColumn, createTableAppendPKClause, createUniqueConstraint, dropTable, externalTypesForJdbcType, findAdapterResource, getBatchTerminator, getExtendedTypes, getPkGenerator, getQueryTranslator, queryTranslatorClass, setPkGenerator, setSupportsBatchUpdates, setSupportsFkConstraints, setSupportsGeneratedKeys, setSupportsUniqueConstraints, shouldRunBatchQuery, supportsBatchUpdates, supportsFkConstraints, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DB2Adapter

public DB2Adapter()
Method Detail

getAction

public SQLAction getAction(Query query,
                           DataNode node)
Uses DB2ActionBuilder to create the right action.

Specified by:
getAction in interface DbAdapter
Overrides:
getAction in class JdbcAdapter
Since:
1.2

createPkGenerator

protected PkGenerator createPkGenerator()
Creates a DB2 specific PK Generator.

Overrides:
createPkGenerator in class JdbcAdapter

configureExtendedTypes

protected void configureExtendedTypes(ExtendedTypeMap map)
Description copied from class: JdbcAdapter
Installs appropriate ExtendedTypes as converters for passing values between JDBC and Java layers. Called from default constructor.

Overrides:
configureExtendedTypes in class JdbcAdapter

createTable

public java.lang.String createTable(DbEntity ent)
Returns a SQL string that can be used to create database table corresponding to ent parameter.

Specified by:
createTable in interface DbAdapter
Overrides:
createTable in class JdbcAdapter

getQualifierTranslator

public QualifierTranslator getQualifierTranslator(QueryAssembler queryAssembler)
Returns a trimming translator.

Specified by:
getQualifierTranslator in interface DbAdapter
Overrides:
getQualifierTranslator in class JdbcAdapter


Copyright © 2001-2006 Apache.org All Rights Reserved.