Class FrontBaseAdapter
java.lang.Object
org.apache.cayenne.dba.JdbcAdapter
org.apache.cayenne.dba.frontbase.FrontBaseAdapter
- All Implemented Interfaces:
DbAdapter
DbAdapter implementation for FrontBase
RDBMS. Sample connection settings to use with FrontBase are shown below:
fb.jdbc.username = _system
fb.jdbc.password = secret
fb.jdbc.url = jdbc:FrontBase://localhost/cayenne/
fb.jdbc.driver = jdbc.FrontBase.FBJDriver
- Since:
- 1.2
-
Field Summary
Fields inherited from class JdbcAdapter
caseInsensitiveCollations, ejbqlTranslatorFactory, extendedTypes, logger, quotingStrategy, resourceLocator, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, typesHandlerModifier and TypeFieldDescriptionprotected booleanprotected EJBQLTranslatorFactoryprotected ExtendedTypeMapprotected JdbcEventLoggerprotected QuotingStrategyprotected ResourceLocatorprotected booleanprotected booleanprotected booleanprotected TypesHandler -
Constructor Summary
ConstructorsConstructorDescriptionFrontBaseAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalled fromJdbcAdapter.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.createTable(DbEntity ent) Customizes table creating procedure for FrontBase.dropTableStatements(DbEntity table) Adds the CASCADE option to the DROP TABLE clause.Uses FrontBaseActionBuilder to create the right action.Returns the name of the table type (as returned byDatabaseMetaData.getTableTypes) for a simple user table.Methods inherited from class JdbcAdapter
bindParameter, buildAttribute, createEJBQLTranslatorFactory, createFkConstraint, createQuotingStrategy, createTableAppendColumn, createTableAppendPKClause, createUniqueConstraint, externalTypesForJdbcType, findResource, getBatchTerminator, getEjbqlTranslatorFactory, getExtendedTypes, getJdbcEventLogger, getPkGenerator, getQuotingStrategy, getSelectTranslator, getSystemCatalogs, getSystemSchemas, getType, initExtendedTypes, setEjbqlTranslatorFactory, setPkGenerator, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForView, typeSupportsLength, typeSupportsScale, unwrapModifier and TypeMethodDescriptionvoidbindParameter(PreparedStatement statement, ParameterBinding binding) Binds an object value to PreparedStatement's parameter.buildAttribute(String name, String typeName, int type, int size, int scale, boolean allowNulls) Creates and returns a DbAttribute based on supplied parameters (usually obtained from database meta data).protected EJBQLTranslatorFactoryCreates and returns anEJBQLTranslatorFactoryused to generate visitors for EJBQL to SQL translations.Returns a SQL string that can be used to create a foreign key constraint for the relationship.protected QuotingStrategyvoidcreateTableAppendColumn(StringBuffer sqlBuffer, DbAttribute column) Appends SQL for column creation to CREATE TABLE buffer.protected voidcreateTableAppendPKClause(StringBuffer sqlBuffer, DbEntity entity) createUniqueConstraint(DbEntity source, Collection<DbAttribute> columns) Returns a DDL string to create a unique constraint over a set of columns.String[]externalTypesForJdbcType(int type) Returns an array of RDBMS types that can be used with JDBCtype.protected URLfindResource(String name) Locates and returns a named adapter resource.Returns default separator - a semicolon.Returns a translator factory for EJBQL to SQL translation.Returns a map of ExtendedTypes that is used to translate values between Java and JDBC layer.Returns primary key generator associated with this DbAdapter.Returns SQL identifier quoting strategy objectgetSelectTranslator(FluentSelect<?, ?> query, EntityResolver entityResolver) static StringgetType(DbAdapter adapter, DbAttribute column) protected voidinitExtendedTypes(List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ValueObjectTypeRegistry valueObjectTypeRegistry) voidsetEjbqlTranslatorFactory(EJBQLTranslatorFactory ejbqlTranslatorFactory) Sets a translator factory for EJBQL to SQL translation.voidsetPkGenerator(PkGenerator pkGenerator) Sets new primary key generator.voidsetSupportsBatchUpdates(boolean flag) voidsetSupportsGeneratedKeys(boolean flag) voidsetSupportsUniqueConstraints(boolean flag) static StringsizeAndPrecision(DbAdapter adapter, DbAttribute column) booleanReturnstrueif the target database supports batch updates.booleanReturns true.booleanReturns true if a target database supports key autogeneration.booleanReturns true.Returns the name of the table type (as returned byDatabaseMetaData.getTableTypes) for a view table.booleantypeSupportsLength(int type) Returns true if supplied type can have a length attribute as a part of column definitionbooleantypeSupportsScale(int type) Returns true if supplied type can have a scale attribute as a part of column definition.unwrap()Simply returns this, as JdbcAdapter is not a wrapper.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DbAdapter
supportsGeneratedKeysForBatchInsertsModifier and TypeMethodDescriptiondefault booleanReturns true if a target database supports key autogeneration in a batch insert.
-
Constructor Details
-
FrontBaseAdapter
public FrontBaseAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry)
-
-
Method Details
-
getSqlTreeProcessor
- Specified by:
getSqlTreeProcessorin interfaceDbAdapter- Overrides:
getSqlTreeProcessorin classJdbcAdapter- Returns:
SQLTreeProcessorthat can adjust SQL tree to specific database flavour- Since:
- 4.2
-
tableTypeForTable
Description copied from interface:DbAdapterReturns the name of the table type (as returned byDatabaseMetaData.getTableTypes) for a simple user table.- Specified by:
tableTypeForTablein interfaceDbAdapter- Overrides:
tableTypeForTablein classJdbcAdapter
-
configureExtendedTypes
Description copied from class:JdbcAdapterCalled fromJdbcAdapter.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.- Overrides:
configureExtendedTypesin classJdbcAdapter
-
createTable
Customizes table creating procedure for FrontBase.- Specified by:
createTablein interfaceDbAdapter- Overrides:
createTablein classJdbcAdapter
-
dropTableStatements
Adds the CASCADE option to the DROP TABLE clause.- Specified by:
dropTableStatementsin interfaceDbAdapter- Overrides:
dropTableStatementsin classJdbcAdapter
-
getAction
-