Class HSQLDBAdapter
java.lang.Object
org.apache.cayenne.dba.JdbcAdapter
org.apache.cayenne.dba.hsqldb.HSQLDBAdapter
- All Implemented Interfaces:
DbAdapter
DbAdapter implementation for the HSQLDB RDBMS.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHSQLDBAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, 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.protected EJBQLTranslatorCreates and returns anEJBQLTranslatorused to generate visitors for EJBQL to SQL translations.Adds an ADD CONSTRAINT clause to a relationship constraint.protected NativeColumnType[]Returns the database-native types supported by this adapter.createTable(DbEntity ent) Uses "CREATE CACHED TABLE" instead of "CREATE TABLE".voidcreateTableAppendColumn(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.getProcedureTranslator(ProcedureQuery query, EntityResolver entityResolver) Returns theProcedureTranslatorfor the given query.protected StringgetSchemaName(DbEntity entity) Returns DbEntity schema name for 1.8 and on.protected StringgetTableName(DbEntity entity) Generate fully-qualified name for 1.8 and on.Methods inherited from class JdbcAdapter
bind, bindParameter, bindParameter, buildAttribute, createPkGenerator, createQuotingStrategy, createTableAppendPKClause, defaultCharColumnLength, dropTableStatements, externalTypesForJdbcType, getBatchTerminator, getEjbqlTranslator, getExtendedTypes, getQuotingStrategy, getQuotingStrategy, getSelectTranslator, getSQLLogger, getSystemCatalogs, getSystemSchemas, getType, initExtendedTypes, nativeColumnTypes, setEjbqlTranslator, setEjbqlTranslatorFactory, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, sizeAndScale, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView, typeSupportsLength, typeSupportsScale, unwrapMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DbAdapter
getEjbqlTranslatorFactory, preferredBindingType, preferredNativeColumnType, supportsGeneratedKeysForBatchInserts
-
Field Details
-
TRIM_FUNCTION
- See Also:
-
-
Constructor Details
-
HSQLDBAdapter
public HSQLDBAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ValueObjectTypeRegistry valueObjectTypeRegistry)
-
-
Method Details
-
createNativeTypes
Description copied from class:JdbcAdapterReturns the database-native types supported by this adapter.- Overrides:
createNativeTypesin 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- Since:
- 4.0
-
getSqlTreeProcessor
- Specified by:
getSqlTreeProcessorin interfaceDbAdapter- Overrides:
getSqlTreeProcessorin classJdbcAdapter- Returns:
SQLTreeProcessorthat can adjust SQL tree to specific database flavour- Since:
- 4.2
-
getProcedureTranslator
public ProcedureTranslator getProcedureTranslator(ProcedureQuery query, EntityResolver entityResolver) Description copied from interface:DbAdapterReturns theProcedureTranslatorfor the given query. The default implementation ignores the query, but the parameter is retained so adapters can pick a translator based on it.- Specified by:
getProcedureTranslatorin interfaceDbAdapter- Overrides:
getProcedureTranslatorin classJdbcAdapter- Since:
- 5.0
-
createEJBQLTranslator
Description copied from class:JdbcAdapterCreates and returns anEJBQLTranslatorused to generate visitors for EJBQL to SQL translations. This method should be overriden by subclasses that need to customize EJBQL generation.- Overrides:
createEJBQLTranslatorin classJdbcAdapter- Since:
- 4.0
-
getTableName
-
getSchemaName
-
getAction
-
createUniqueConstraint
Returns a DDL string to create a unique constraint over a set of columns.- Specified by:
createUniqueConstraintin interfaceDbAdapter- Overrides:
createUniqueConstraintin classJdbcAdapter- Since:
- 1.1
-
createFkConstraint
Adds an ADD CONSTRAINT clause to a relationship constraint.- Specified by:
createFkConstraintin interfaceDbAdapter- Overrides:
createFkConstraintin classJdbcAdapter- See Also:
-
createTable
Uses "CREATE CACHED TABLE" instead of "CREATE TABLE".- Specified by:
createTablein interfaceDbAdapter- Overrides:
createTablein classJdbcAdapter- Since:
- 1.2
-
createTableAppendColumn
Description copied from class:JdbcAdapterAppends SQL for column creation to CREATE TABLE buffer.- Specified by:
createTableAppendColumnin interfaceDbAdapter- Overrides:
createTableAppendColumnin classJdbcAdapter- Parameters:
sqlBuffer- theStringBufferto append the column type tocolumn- theDbAttributedefining the column to append type for
-