org.apache.cayenne.dba.hsqldb
Class HSQLDBAdapter

java.lang.Object
  extended by org.apache.cayenne.dba.JdbcAdapter
      extended by org.apache.cayenne.dba.hsqldb.HSQLDBAdapter
All Implemented Interfaces:
DbAdapter
Direct Known Subclasses:
HSQLDBNoSchemaAdapter

public class HSQLDBAdapter
extends JdbcAdapter

DbAdapter implementation for the HSQLDB RDBMS . Sample connection settings to use with HSQLDB are shown below:

       
        test-hsqldb.cayenne.adapter = org.apache.cayenne.dba.hsqldb.HSQLDBAdapter
        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
        
 

Author:
Holger Hoffstaette

Field Summary
 
Fields inherited from class org.apache.cayenne.dba.JdbcAdapter
extendedTypes, pkGenerator, supportsBatchUpdates, supportsFkConstraints, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler
 
Constructor Summary
HSQLDBAdapter()
           
 
Method Summary
protected  void configureExtendedTypes(ExtendedTypeMap map)
          Installs appropriate ExtendedTypes as converters for passing values between JDBC and Java layers.
 java.lang.String createFkConstraint(DbRelationship rel)
          Adds an ADD CONSTRAINT clause to a relationship constraint.
 java.lang.String createTable(DbEntity ent)
          Uses "CREATE CACHED TABLE" instead of "CREATE TABLE".
 java.lang.String createUniqueConstraint(DbEntity source, java.util.Collection columns)
          Returns a DDL string to create a unique constraint over a set of columns.
 SQLAction getAction(Query query, DataNode node)
          Uses special action builder to create the right action.
protected  java.lang.String getSchemaName(DbEntity entity)
          Generate fully-qualified name for 1.8 and on.
protected  java.lang.String getTableName(DbEntity entity)
          Generate fully-qualified name for 1.8 and on.
 
Methods inherited from class org.apache.cayenne.dba.JdbcAdapter
bindParameter, buildAttribute, createDataNode, createPkGenerator, createTableAppendColumn, createTableAppendPKClause, dropTable, externalTypesForJdbcType, findAdapterResource, getBatchTerminator, getExtendedTypes, getPkGenerator, getQualifierTranslator, getQueryTranslator, queryTranslatorClass, setPkGenerator, setSupportsBatchUpdates, setSupportsFkConstraints, setSupportsGeneratedKeys, setSupportsUniqueConstraints, shouldRunBatchQuery, supportsBatchUpdates, supportsFkConstraints, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, tableTypeForView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HSQLDBAdapter

public HSQLDBAdapter()
Method Detail

configureExtendedTypes

protected void configureExtendedTypes(ExtendedTypeMap map)
Description copied from class: JdbcAdapter
Installs appropriate ExtendedTypes as converters for passing values between JDBC and Java layers. Called from default constructor.

Overrides:
configureExtendedTypes in class JdbcAdapter

getTableName

protected java.lang.String getTableName(DbEntity entity)
Generate fully-qualified name for 1.8 and on. Subclass generates unqualified name.

Since:
1.2

getSchemaName

protected java.lang.String getSchemaName(DbEntity entity)
Generate fully-qualified name for 1.8 and on. Subclass generates unqualified name.

Since:
1.2

getAction

public SQLAction getAction(Query query,
                           DataNode node)
Uses special action builder to create the right action.

Specified by:
getAction in interface DbAdapter
Overrides:
getAction in class JdbcAdapter
Since:
1.2

createUniqueConstraint

public java.lang.String createUniqueConstraint(DbEntity source,
                                               java.util.Collection columns)
Returns a DDL string to create a unique constraint over a set of columns.

Specified by:
createUniqueConstraint in interface DbAdapter
Overrides:
createUniqueConstraint in class JdbcAdapter
Since:
1.1

createFkConstraint

public java.lang.String createFkConstraint(DbRelationship rel)
Adds an ADD CONSTRAINT clause to a relationship constraint.

Specified by:
createFkConstraint in interface DbAdapter
Overrides:
createFkConstraint in class JdbcAdapter
See Also:
JdbcAdapter.createFkConstraint(DbRelationship)

createTable

public java.lang.String createTable(DbEntity ent)
Uses "CREATE CACHED TABLE" instead of "CREATE TABLE".

Specified by:
createTable in interface DbAdapter
Overrides:
createTable in class JdbcAdapter
Since:
1.2


Copyright © 2001-2006 Apache.org All Rights Reserved.