Package org.apache.cayenne.dba.hsqldb
Class HSQLDBAdapter
java.lang.Object
org.apache.cayenne.dba.JdbcAdapter
org.apache.cayenne.dba.hsqldb.HSQLDBAdapter
- All Implemented Interfaces:
DbAdapter
- Direct Known Subclasses:
HSQLDBNoSchemaAdapter
DbAdapter implementation for the
HSQLDB RDBMS . Sample connection settings to use with HSQLDB are shown
below:
test-hsqldb.jdbc.username = test test-hsqldb.jdbc.password = secret test-hsqldb.jdbc.url = jdbc:hsqldb:hsql://serverhostname test-hsqldb.jdbc.driver = org.hsqldb.jdbcDriver
-
Field Summary
Fields inherited from class org.apache.cayenne.dba.JdbcAdapter
batchQueryBuilderFactory, caseInsensitiveCollations, ejbqlTranslatorFactory, extendedTypes, logger, quotingStrategy, resourceLocator, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler
-
Constructor Summary
ConstructorDescriptionHSQLDBAdapter
(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Called 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.protected EJBQLTranslatorFactory
Creates and returns anEJBQLTranslatorFactory
used to generate visitors for EJBQL to SQL translations.Adds an ADD CONSTRAINT clause to a relationship constraint.createTable
(DbEntity ent) Uses "CREATE CACHED TABLE" instead of "CREATE TABLE".void
createTableAppendColumn
(StringBuffer sqlBuffer, DbAttribute column) Appends SQL for column creation to CREATE TABLE buffer.createUniqueConstraint
(DbEntity source, Collection<DbAttribute> columns) Returns a DDL string to create a unique constraint over a set of columns.Uses special action builder to create the right action.protected String
getSchemaName
(DbEntity entity) Returns DbEntity schema name for 1.8 and on.protected String
getTableName
(DbEntity entity) Generate fully-qualified name for 1.8 and on.Methods inherited from class org.apache.cayenne.dba.JdbcAdapter
bindParameter, buildAttribute, createPkGenerator, createQuotingStrategy, createTableAppendPKClause, dropTableStatements, externalTypesForJdbcType, findResource, getBatchTerminator, getEjbqlTranslatorFactory, getExtendedTypes, getJdbcEventLogger, getPkGenerator, getQuotingStrategy, getSelectTranslator, getSelectTranslator, getSystemCatalogs, getSystemSchemas, getType, initExtendedTypes, setEjbqlTranslatorFactory, setPkGenerator, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, typeSupportsLength, unwrap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.cayenne.dba.DbAdapter
supportsGeneratedKeysForBatchInserts
-
Field Details
-
TRIM_FUNCTION
- See Also:
-
-
Constructor Details
-
HSQLDBAdapter
public HSQLDBAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry)
-
-
Method Details
-
configureExtendedTypes
Description copied from class:JdbcAdapter
Called 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:
configureExtendedTypes
in classJdbcAdapter
- Since:
- 4.0
-
getSqlTreeProcessor
- Specified by:
getSqlTreeProcessor
in interfaceDbAdapter
- Overrides:
getSqlTreeProcessor
in classJdbcAdapter
- Returns:
SQLTreeProcessor
that can adjust SQL tree to specific database flavour- Since:
- 4.2
-
createEJBQLTranslatorFactory
Description copied from class:JdbcAdapter
Creates and returns anEJBQLTranslatorFactory
used to generate visitors for EJBQL to SQL translations. This method should be overriden by subclasses that need to customize EJBQL generation.- Overrides:
createEJBQLTranslatorFactory
in classJdbcAdapter
- Since:
- 4.0
-
getTableName
Generate fully-qualified name for 1.8 and on. Subclass generates unqualified name.- Since:
- 1.2
-
getSchemaName
Returns DbEntity schema name for 1.8 and on. Subclass generates unqualified name.- Since:
- 1.2
-
getAction
Uses special action builder to create the right action.- Specified by:
getAction
in interfaceDbAdapter
- Overrides:
getAction
in classJdbcAdapter
- Since:
- 1.2
-
createUniqueConstraint
Returns a DDL string to create a unique constraint over a set of columns.- Specified by:
createUniqueConstraint
in interfaceDbAdapter
- Overrides:
createUniqueConstraint
in classJdbcAdapter
- Since:
- 1.1
-
createFkConstraint
Adds an ADD CONSTRAINT clause to a relationship constraint.- Specified by:
createFkConstraint
in interfaceDbAdapter
- Overrides:
createFkConstraint
in classJdbcAdapter
- See Also:
-
createTable
Uses "CREATE CACHED TABLE" instead of "CREATE TABLE".- Specified by:
createTable
in interfaceDbAdapter
- Overrides:
createTable
in classJdbcAdapter
- Since:
- 1.2
-
createTableAppendColumn
Description copied from class:JdbcAdapter
Appends SQL for column creation to CREATE TABLE buffer.- Specified by:
createTableAppendColumn
in interfaceDbAdapter
- Overrides:
createTableAppendColumn
in classJdbcAdapter
- Parameters:
sqlBuffer
- theStringBuffer
to append the column type tocolumn
- theDbAttribute
defining the column to append type for
-