com.triactive.jdo.store.adapter
Class HsqldbAdapter

java.lang.Object
  extended bycom.triactive.jdo.store.adapter.DatabaseAdapter
      extended bycom.triactive.jdo.store.adapter.HsqldbAdapter

public class HsqldbAdapter
extends DatabaseAdapter

Provides methods for adapting SQL language elements to the hsqldb database.

Currently this adapter is just an untested placeholder.

Author:
Mike Martin

Field Summary
 
Fields inherited from class com.triactive.jdo.store.adapter.DatabaseAdapter
dbid, identifierQuoteString, keywords, maxCatalogNameLength, maxColumnNameLength, maxConstraintNameLength, maxCorrelationNameLength, maxIndexNameLength, maxSchemaNameLength, maxTableNameLength, storesLowerCaseIdentifiers, storesUpperCaseIdentifiers, supportsCorrelatedSubqueries, supportsGroupByUnrelated, supportsOrderByUnrelated, supportsSubqueriesInExists, supportsSubqueriesInIns, typeMappings, types
 
Constructor Summary
HsqldbAdapter()
           
 
Method Summary
protected  DatabaseIdentifier getBestIdentifyingPatterns()
          Returns a database identifier containing patterns with which to identify which databases are best supported by this adapter.
 java.lang.String getDropTableStatement(BaseTable table)
          Returns the appropriate SQL to drop the given table.
 boolean supportsDeferredConstraints()
           
 
Methods inherited from class com.triactive.jdo.store.adapter.DatabaseAdapter
adaptTo, avgFunction, bitTypeIsReallyBoolean, cast, countFunction, createIndexesBeforeForeignKeys, createTypeInfo, getAddCandidateKeyStatement, getAddForeignKeyStatement, getAddPrimaryKeyStatement, getCreateIndexStatement, getCreateTableStatement, getCurrentTimestamp, getDropForeignKeyStatement, getDropViewStatement, getIdentifierQuoteString, getInstance, getMaxCatalogNameLength, getMaxColumnNameLength, getMaxConstraintNameLength, getMaxCorrelationNameLength, getMaxIndexNameLength, getMaxPreparedStatementParameters, getMaxSchemaNameLength, getMaxTableNameLength, getQueryCurrentSchemaNameStatement, getQueryCurrentTimestampStatement, getSchemaName, getSqlState, getTypeInfo, getTypeInfo, getUnlimitedLengthPrecisionValue, getVendorID, isBestAdapterFor, isEmbeddedType, isSqlKeyword, lengthMethod, mappingClassFor, mappingClassFor, maxFunction, minFunction, newColumnInfo, newColumnMapping, newDataStoreException, newForeignKeyInfo, newIndexInfo, newMapping, newMapping, newPrimaryKeyInfo, newQueryStatement, newQueryStatement, newQueryStatement, newTableExpression, newTableInfo, newTypeInfo, parseKeywordList, storesLowerCaseIdentifiers, storesUpperCaseIdentifiers, substringMethod, substringMethod, sumFunction, supportsBooleanComparison, supportsCorrelatedSubqueries, supportsGroupByUnrelated, supportsNullsInCandidateKeys, supportsOrderByUnrelated, supportsSubqueriesInExists, supportsSubqueriesInIns, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HsqldbAdapter

public HsqldbAdapter()
Method Detail

getBestIdentifyingPatterns

protected DatabaseIdentifier getBestIdentifyingPatterns()
Description copied from class: DatabaseAdapter
Returns a database identifier containing patterns with which to identify which databases are best supported by this adapter. This method is used by the default implementation of DatabaseAdapter.isBestAdapterFor(com.triactive.jdo.store.adapter.DatabaseIdentifier, java.sql.DatabaseMetaData). Overriding this method is a simple but fairly flexible way for subclasses to define which database(s) they support.

The default implementation in this class returns patterns that match the product name against the following regular expression:

 "(?is).*" + getVendorID() + ".*"
 
If the vendor ID is a suitably unique keyword that would always be expected to occur in the product name of the target database (and to not occur in any others) then no other methods need to be overridden in order for the right adapter subclass to get selected.

Overrides:
getBestIdentifyingPatterns in class DatabaseAdapter
See Also:
DatabaseAdapter.getVendorID(), DatabaseIdentifier.matches(com.triactive.jdo.store.adapter.DatabaseIdentifier)

supportsDeferredConstraints

public boolean supportsDeferredConstraints()
Overrides:
supportsDeferredConstraints in class DatabaseAdapter

getDropTableStatement

public java.lang.String getDropTableStatement(BaseTable table)
Description copied from class: DatabaseAdapter
Returns the appropriate SQL to drop the given table. It should return something like:

 DROP TABLE FOO CASCADE
 

Overrides:
getDropTableStatement in class DatabaseAdapter
Parameters:
table - The table to drop.
Returns:
The text of the SQL statement.


Copyright 2001-2007 The TJDO Project All Rights Reserved.