com.sibvisions.rad.persist.jdbc
Class H2DBAccess

java.lang.Object
  extended by com.sibvisions.rad.persist.jdbc.DBAccess
      extended by com.sibvisions.rad.persist.jdbc.H2DBAccess
All Implemented Interfaces:
IDBAccess, ICloseable

public class H2DBAccess
extends DBAccess

The H2DBAccess is the implementation for the H2 database.

See Also:
DBAccess

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sibvisions.rad.persist.jdbc.DBAccess
DBAccess.BlobFileHandle, DBAccess.ParameterizedStatement
 
Field Summary
 
Fields inherited from class com.sibvisions.rad.persist.jdbc.DBAccess
ALLOWED_VALUES_NULL, BFILE, cachedCatalogInfo, cachedColumnMetaData, cachedMetaDataIdentifier, cachedSchemaInfo, COLUMNMETADATA_NULL, currentSavepoint, DEFAULT_VALUES_NULL, FKS_NULL, LONGNVARCHAR, NCHAR, NCLOB, NVARCHAR, PKS_NULL, QUOTE, SQLXML, TABLEINFO_NULL, TABLENAME_NULL, TIMESTAMPWITHLOCALTIMEZONE, TIMESTAMPWITHTIMEZONE, UKS_NULL
 
Constructor Summary
H2DBAccess()
          Creates a new instance of H2DBAccess.
 
Method Summary
protected  String getColumnName(ResultSetMetaData pMetaData, int pColumn)
          Gets the column name from the given resultset metadata.
protected  Map<String,Object> getDefaultValuesIntern(String pCatalog, String pSchema, String pTable)
          Gets all default column values of a specific table.
protected  List<ForeignKey> getForeignKeysIntern(String pCatalog, String pSchema, String pTable)
          Returns all Foreign Keys for the specified table.
 
Methods inherited from class com.sibvisions.rad.persist.jdbc.DBAccess
clearMetaData, clearMetaData, close, commit, commitOrRollbackBeforeClose, convertDatabaseSpecificObjectToValue, convertValueToDatabaseSpecificObject, createIdentifier, createReplace, createServerColumnMetaData, createWhereColumn, createWhereParam, debug, delete, detectModified, error, eventClearedMetaData, eventClosedDBAccess, eventConfigureConnection, eventOpenedDBAccess, eventUnconfigureConnection, executeFunction, executeFunction, executeInsertStatement, executeProcedure, executeQuery, executeSql, executeSqlMulti, executeStatement, fetch, fetch, fetch, fetch, fillResultSetIntoListOfBean, findAndCreateReducedCondition, findNamedParameters, fireEventAfterOpenDBAccess, fireEventBeforeCloseDBAccess, fireEventClearedMetaData, fireEventConfigureConnection, fireEventUnconfigureConnection, formatSQLException, formatSQLException, getAllowedValues, getAllowedValuesCache, getAllowedValuesIntern, getAndStoreMetaDataIntern, getApplicationName, getAutomaticLinkColumnNameTranslation, getCloseQuoteCharacter, getColumnMetaData, getColumnMetaDataCache, getColumnMetaDataCreator, getColumnMetaDataIntern, getConnection, getConnectionIntern, getConnectionPool, getDatabaseSpecificLockStatement, getDBAccess, getDBAccess, getDBAccess, getDBAccess, getDBAccess, getDBAccessByIdentifier, getDBProperties, getDBProperty, getDefaultAllowedValues, getDefaultCursorCacheTimeout, getDefaultLargeObjectLimit, getDefaultSchema, getDefaultValues, getDefaultValuesCache, getDiscardRowCount, getDriver, getForeignKeyCache, getForeignKeys, getIdentifier, getLargeObjectLimit, getMaxColumnLength, getMaxTime, getMetaDataCacheOption, getMetaDataWhereClause, getObjectFromResultSet, getObjectFromResultSet, getOpenQuoteCharacter, getParameter, getParameter, getParameterizedSelectStatement, getPassword, getPreparedStatement, getPreparedStatement, getPrimaryKey, getPrimaryKeyCache, getPrimaryKeyIntern, getQueryTimeout, getRealQueryColumnName, getSelectStatement, getSelectStatement, getSQL, getTableForSynonym, getTableForSynonymIntern, getTableInfo, getTableInfoCache, getTableInfoIntern, getTableNameCache, getTransactionTimeout, getUniqueKeyCache, getUniqueKeys, getUniqueKeysIntern, getUrl, getUsername, getWhereClause, info, initializeColumnMetaData, initializeDataType, initializeServerColumnMetaData, insert, insertAnsiSQL, insertDatabaseSpecific, isAutoCommit, isAutoQuote, isConnectionPoolEnabled, isJdbc, isLogEnabled, isMetaDataCacheEnabled, isModified, isOpen, isReleaseConnectionPending, isTypeEqual, isUseSavepoints, lockRow, lockRowInternal, open, prepareConnection, quote, quoteAllways, registerDBAccessClass, releaseConnection, releaseConnectionIntern, releaseSavepoint, removeDBSpecificQuotes, removeQuotes, rollback, rollbackToSavepoint, setAllowedValuesCache, setAutoCommit, setAutomaticLinkColumnNameTranslation, setColumnMetaDataCache, setColumnMetaDataCreator, setColumnMetaDataCreator, setColumnsToStore, setConnection, setConnectionPool, setConnectionPoolEnabled, setDBProperties, setDBProperty, setDefaultCursorCacheTimeout, setDefaultLargeObjectLimit, setDefaultSchema, setDefaultValuesCache, setDriver, setForeignKeyCache, setLargeObjectLimit, setMaxTime, setMetaDataCacheOption, setModified, setPassword, setPrimaryKeyCache, setQueryTimeout, setQuoteCharacters, setSavepoint, setTableInfoCache, setTableNameCache, setTransactionTimeout, setUniqueKeyCache, setUrl, setUsername, setUseSavepoints, splitSchemaTable, supportsGetGeneratedKeys, toString, translateDefaultValue, translateQuotes, translateValue, update, updateAnsiSQL, updateDatabaseSpecific
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

H2DBAccess

public H2DBAccess()
Creates a new instance of H2DBAccess.

Method Detail

getColumnName

protected String getColumnName(ResultSetMetaData pMetaData,
                               int pColumn)
                        throws SQLException
Gets the column name from the given resultset metadata.

Overrides:
getColumnName in class DBAccess
Parameters:
pMetaData - the metadata
pColumn - the column index
Returns:
the column name
Throws:
SQLException - if accessing metadata failed

getDefaultValuesIntern

protected Map<String,Object> getDefaultValuesIntern(String pCatalog,
                                                    String pSchema,
                                                    String pTable)
                                             throws DataSourceException
Gets all default column values of a specific table.

Overrides:
getDefaultValuesIntern in class DBAccess
Parameters:
pCatalog - the catalog name
pSchema - the schema name
pTable - the table name
Returns:
a Hashtable with the column name as key and the default value as value. It only contains columns with a default value
Throws:
DataSourceException - if the database access throws an exception

getForeignKeysIntern

protected List<ForeignKey> getForeignKeysIntern(String pCatalog,
                                                String pSchema,
                                                String pTable)
                                         throws DataSourceException
Returns all Foreign Keys for the specified table.

Overrides:
getForeignKeysIntern in class DBAccess
Parameters:
pCatalog - the catalog to use
pSchema - the schema to use
pTable - the table to use as base table.
Returns:
all Foreign Keys for the specified table.
Throws:
DataSourceException - if an error occur in determining the ForeignKeys.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.