public class DB2Adapter extends JdbcAdapter
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
batchQueryBuilderFactory, caseInsensitiveCollations, ejbqlTranslatorFactory, extendedTypes, logger, quotingStrategy, resourceLocator, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler
Constructor and Description |
---|
DB2Adapter(RuntimeProperties runtimeProperties,
List<ExtendedType> defaultExtendedTypes,
List<ExtendedType> userExtendedTypes,
List<ExtendedTypeFactory> extendedTypeFactories,
ResourceLocator resourceLocator,
ValueObjectTypeRegistry valueObjectTypeRegistry) |
Modifier and Type | Method and Description |
---|---|
void |
bindParameter(PreparedStatement statement,
ParameterBinding binding)
Binds an object value to PreparedStatement's parameter.
|
protected void |
configureExtendedTypes(ExtendedTypeMap map)
Called from
JdbcAdapter.initExtendedTypes(List, List, List, ValueObjectTypeRegistry) to load
adapter-specific types into the ExtendedTypeMap right after the default
types are loaded, but before the DI overrides are. |
protected PkGenerator |
createPkGenerator()
Creates a DB2 specific PK Generator.
|
void |
createTableAppendColumn(StringBuffer sqlBuffer,
DbAttribute column)
Appends SQL for column creation to CREATE TABLE buffer.
|
SQLAction |
getAction(Query query,
DataNode node)
Uses special action builder to create the right action.
|
EJBQLTranslatorFactory |
getEjbqlTranslatorFactory()
Returns a translator factory for EJBQL to SQL translation.
|
QualifierTranslator |
getQualifierTranslator(QueryAssembler queryAssembler)
Returns a trimming translator.
|
boolean |
typeSupportsLength(int type)
Returns true if supplied type can have a length attribute as a part of
column definition
|
buildAttribute, createEJBQLTranslatorFactory, createFkConstraint, createQuotingStrategy, createTable, createTableAppendPKClause, createUniqueConstraint, dropTableStatements, externalTypesForJdbcType, findResource, getBatchQueryBuilderFactory, getBatchTerminator, getExtendedTypes, getJdbcEventLogger, getPkGenerator, getQuotingStrategy, getQuotingStrategy, getSelectTranslator, getType, initExtendedTypes, setBatchQueryBuilderFactory, setEjbqlTranslatorFactory, setPkGenerator, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, unwrap
public DB2Adapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry)
protected PkGenerator createPkGenerator()
createPkGenerator
in class JdbcAdapter
protected void configureExtendedTypes(ExtendedTypeMap map)
JdbcAdapter
JdbcAdapter.initExtendedTypes(List, List, List, ValueObjectTypeRegistry)
to load
adapter-specific types into the ExtendedTypeMap right after the default
types are loaded, but before the DI overrides are. This method has
specific implementations in JdbcAdapter subclasses.configureExtendedTypes
in class JdbcAdapter
public void createTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column)
JdbcAdapter
createTableAppendColumn
in interface DbAdapter
createTableAppendColumn
in class JdbcAdapter
sqlBuffer
- the StringBuffer
to append the column type tocolumn
- the DbAttribute
defining the column to append type forpublic boolean typeSupportsLength(int type)
JdbcAdapter
typeSupportsLength
in interface DbAdapter
typeSupportsLength
in class JdbcAdapter
public QualifierTranslator getQualifierTranslator(QueryAssembler queryAssembler)
getQualifierTranslator
in interface DbAdapter
getQualifierTranslator
in class JdbcAdapter
public EJBQLTranslatorFactory getEjbqlTranslatorFactory()
JdbcAdapter
JdbcAdapter.createEJBQLTranslatorFactory()
, and can be changed later by
calling JdbcAdapter.setEjbqlTranslatorFactory(EJBQLTranslatorFactory)
.getEjbqlTranslatorFactory
in interface DbAdapter
getEjbqlTranslatorFactory
in class JdbcAdapter
public void bindParameter(PreparedStatement statement, ParameterBinding binding) throws Exception
DbAdapter
bindParameter
in interface DbAdapter
bindParameter
in class JdbcAdapter
Exception
Copyright © 2001–2019 Apache Cayenne. All rights reserved.