public class DerbyAdapter extends JdbcAdapter
test-derby.jdbc.url = jdbc:derby:testdb;create=true test-derby.jdbc.driver = org.apache.derby.jdbc.EmbeddedDriver
derbynet.jdbc.url = jdbc:derby://localhost/cayenne derbynet.jdbc.driver = org.apache.derby.jdbc.ClientDriver derbynet.jdbc.username = someuser derbynet.jdbc.password = secret;
batchQueryBuilderFactory, caseInsensitiveCollations, ejbqlTranslatorFactory, extendedTypes, logger, quotingStrategy, resourceLocator, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler
Constructor and Description |
---|
DerbyAdapter(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)
Installs appropriate ExtendedTypes as converters for passing values between JDBC
and Java layers.
|
protected EJBQLTranslatorFactory |
createEJBQLTranslatorFactory()
Creates and returns an
EJBQLTranslatorFactory used to generate
visitors for EJBQL to SQL translations. |
protected PkGenerator |
createPkGenerator()
Creates and returns a primary key generator.
|
void |
createTableAppendColumn(StringBuffer sqlBuffer,
DbAttribute column)
Appends SQL for column creation to CREATE TABLE buffer.
|
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, createFkConstraint, createQuotingStrategy, createTable, createTableAppendPKClause, createUniqueConstraint, dropTableStatements, externalTypesForJdbcType, findResource, getAction, getBatchTerminator, getEjbqlTranslatorFactory, getExtendedTypes, getJdbcEventLogger, getPkGenerator, getQuotingStrategy, getSelectTranslator, getType, initExtendedTypes, setEjbqlTranslatorFactory, setPkGenerator, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, unwrap
public DerbyAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry)
protected PkGenerator createPkGenerator()
JdbcAdapter
createPkGenerator
in class JdbcAdapter
protected void configureExtendedTypes(ExtendedTypeMap map)
configureExtendedTypes
in class JdbcAdapter
public void createTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column)
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
protected EJBQLTranslatorFactory createEJBQLTranslatorFactory()
JdbcAdapter
EJBQLTranslatorFactory
used to generate
visitors for EJBQL to SQL translations. This method should be overriden
by subclasses that need to customize EJBQL generation.createEJBQLTranslatorFactory
in class JdbcAdapter
public void bindParameter(PreparedStatement statement, ParameterBinding binding) throws SQLException, Exception
DbAdapter
bindParameter
in interface DbAdapter
bindParameter
in class JdbcAdapter
SQLException
Exception
Copyright © 2001–2019 Apache Cayenne. All rights reserved.