com.scooterframework.orm.sqldataexpress.vendor
Class H2DBAdapter

java.lang.Object
  extended by com.scooterframework.orm.sqldataexpress.vendor.DBAdapter
      extended by com.scooterframework.orm.sqldataexpress.vendor.H2DBAdapter

public class H2DBAdapter
extends DBAdapter

H2DBAdapter class applies to H2 database.


Field Summary
 
Fields inherited from class com.scooterframework.orm.sqldataexpress.vendor.DBAdapter
IGNORE, USE_LOGIN_USER_ID_AS_SCHEMA
 
Constructor Summary
H2DBAdapter()
           
 
Method Summary
 java.lang.String[] getCatalogAndSchema(java.lang.String connName)
          Returns both catalog and schema of a connection.
protected  java.lang.String getH2Schema(java.lang.String connName)
           
 java.lang.String getOneRowSelectSQL(java.lang.String catalog, java.lang.String schema, java.lang.String tableName)
          Returns a SQL SELECT query which retrieves only one record from a table.
 java.lang.String preparePaginationSql(java.lang.String selectSql, java.util.Map<java.lang.String,java.lang.Object> inputs, java.util.Map<java.lang.String,java.lang.String> outputFilters)
          Returns a SQL query for pagination.
 
Methods inherited from class com.scooterframework.orm.sqldataexpress.vendor.DBAdapter
canChangeTableNameCase, dotCount, getBlobData, getClobData, getExpandedTableName, getExpandedTableName, getExpandedTableName, getInputStream, getLoginPassword, getLoginUserId, getObjectFromResultSetByType, getObjectFromStatementByType, getOneRowSelectSQL, getRetrieveAllSQL, getRetrieveAllSQL, getTotalCountSQL, getTotalCountSQL, getType, isEmpty, resolveCatalogAndSchemaAndTable, resolveCatalogAndSchemaAndTable, resolveCatalogAndSchemaAndTable, resolveCatalogAndSchemaAndTableFromTableName, useLoginAsSchema, vendorSpecificSetObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

H2DBAdapter

public H2DBAdapter()
Method Detail

getCatalogAndSchema

public java.lang.String[] getCatalogAndSchema(java.lang.String connName)
Description copied from class: DBAdapter
Returns both catalog and schema of a connection.

Specified by:
getCatalogAndSchema in class DBAdapter
Parameters:
connName - database connection name
Returns:
a string array containing catalog and schema

getH2Schema

protected java.lang.String getH2Schema(java.lang.String connName)

getOneRowSelectSQL

public java.lang.String getOneRowSelectSQL(java.lang.String catalog,
                                           java.lang.String schema,
                                           java.lang.String tableName)
Description copied from class: DBAdapter
Returns a SQL SELECT query which retrieves only one record from a table. This query is used for retrieving meta data of the underlining table.

Specified by:
getOneRowSelectSQL in class DBAdapter
Parameters:
catalog - catalog name
schema - schema name
tableName - table name
Returns:
a SELECT query string

preparePaginationSql

public java.lang.String preparePaginationSql(java.lang.String selectSql,
                                             java.util.Map<java.lang.String,java.lang.Object> inputs,
                                             java.util.Map<java.lang.String,java.lang.String> outputFilters)
Description copied from class: DBAdapter
Returns a SQL query for pagination. This method converts a generic SQL query statement to a SQL query for pagination.

Specified by:
preparePaginationSql in class DBAdapter
Parameters:
selectSql - the original SQL statement
inputs - inputs
outputFilters - outputFilters
Returns:
a SQL query for pagination