com.sibvisions.rad.persist.jdbc
Class DerbyDBAccess

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

public class DerbyDBAccess
extends DBAccess

The DerbyDBAccess is the implementation for Derby databases. Client driver version.

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
BFILE, LONGNVARCHAR, NCHAR, NCLOB, NVARCHAR, QUOTE, SQLXML, TIMESTAMPWITHLOCALTIMEZONE, TIMESTAMPWITHTIMEZONE
 
Constructor Summary
DerbyDBAccess()
          Constructs a new DerbyDBAccess Object.
 
Method Summary
protected  java.lang.String createReplace(java.lang.String pSource, java.lang.String pOld, java.lang.String pNew)
          Create an DB specific replace command, which replacs in the pSource all pOld to pNew.
protected  java.util.Map<java.lang.String,java.lang.Object> getDefaultValuesIntern(java.lang.String pCatalog, java.lang.String pSchema, java.lang.String pTable)
          Gets all default column values of a specific table.
protected  TableInfo getTableInfoIntern(java.lang.String pWriteBackTable)
          Returns the meta data information for the specified query, and configures all columns with defaults.
 boolean supportsGetGeneratedKeys()
          Returns if this Database specific supports generated keys.
 
Methods inherited from class com.sibvisions.rad.persist.jdbc.DBAccess
clearMetaData, clearMetaData, close, commit, commitOrRollbackBeforeClose, convertDatabaseSpecificObjectToValue, convertValueToDatabaseSpecificObject, createIdentifier, createServerColumnMetaData, createWhereColumn, createWhereParam, debug, delete, detectModified, error, eventConfigureConnection, eventUnconfigureConnection, executeFunction, executeFunction, executeProcedure, executeQuery, executeSql, executeSqlMulti, executeStatement, fetch, fetch, fetch, fetch, findAndCreateReducedCondition, findNamedParameters, fireEventConfigureConnection, fireEventUnconfigureConnection, formatSQLException, formatSQLException, getAllowedValues, getAllowedValuesIntern, getAutomaticLinkColumnNameTranslation, getCloseQuoteCharacter, getColumnMetaData, getColumnMetaDataCreator, getColumnMetaDataIntern, getColumnName, getConnection, getConnectionIntern, getConnectionPool, getDatabaseSpecificLockStatement, getDBAccess, getDBAccess, getDBAccess, getDBAccess, getDBAccess, getDBProperties, getDBProperty, getDefaultAllowedValues, getDefaultCursorCacheTimeout, getDefaultLargeObjectLimit, getDefaultSchema, getDefaultValues, getDiscardRowCount, getDriver, getForeignKeys, getForeignKeysIntern, getIdentifier, getLargeObjectLimit, getMaxColumnLength, getMaxTime, getMetaDataCacheOption, getMetaDataWhereClause, getObjectFromResultSet, getObjectFromResultSet, getOpenQuoteCharacter, getParameter, getParameter, getParameterizedSelectStatement, getPassword, getPreparedStatement, getPreparedStatement, getPrimaryKey, getPrimaryKeyIntern, getQueryTimeout, getRealQueryColumnName, getSelectStatement, getSelectStatement, getSQL, getTableForSynonym, getTableForSynonymIntern, getTableInfo, getTransactionTimeout, getUniqueKeys, getUniqueKeysIntern, getUrl, getUsername, getWhereClause, info, initializeColumnMetaData, initializeDataType, initializeServerColumnMetaData, insert, insertAnsiSQL, insertDatabaseSpecific, isAutoCommit, isAutoQuote, isConnectionPoolEnabled, isJdbc, isLogEnabled, isMetaDataCacheEnabled, isModified, isOpen, isReleaseConnectionPending, isTypeEqual, lockRow, lockRowInternal, open, prepareConnection, quote, quoteAllways, registerDBAccessClass, releaseConnection, releaseConnectionIntern, removeDBSpecificQuotes, removeQuotes, rollback, setAutoCommit, setAutomaticLinkColumnNameTranslation, setColumnMetaDataCreator, setColumnMetaDataCreator, setColumnsToStore, setConnection, setConnectionPool, setConnectionPoolEnabled, setDBProperties, setDBProperty, setDefaultCursorCacheTimeout, setDefaultLargeObjectLimit, setDefaultSchema, setDriver, setLargeObjectLimit, setMaxTime, setMetaDataCacheOption, setModified, setPassword, setQueryTimeout, setQuoteCharacters, setTransactionTimeout, setUrl, setUsername, splitSchemaTable, 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

DerbyDBAccess

public DerbyDBAccess()
Constructs a new DerbyDBAccess Object.

Method Detail

supportsGetGeneratedKeys

public boolean supportsGetGeneratedKeys()
Returns if this Database specific supports generated keys. Because of Derby bug!

Overrides:
supportsGetGeneratedKeys in class DBAccess
Returns:
if this Database specific supports generated keys.

getDefaultValuesIntern

protected java.util.Map<java.lang.String,java.lang.Object> getDefaultValuesIntern(java.lang.String pCatalog,
                                                                                  java.lang.String pSchema,
                                                                                  java.lang.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

createReplace

protected java.lang.String createReplace(java.lang.String pSource,
                                         java.lang.String pOld,
                                         java.lang.String pNew)
Create an DB specific replace command, which replacs in the pSource all pOld to pNew. This implementation use the ANSI SQL REPLACE command.

Overrides:
createReplace in class DBAccess
Parameters:
pSource - the source to replace.
pOld - the old value.
pNew - the new value.
Returns:
the SQL command to to this.

getTableInfoIntern

protected TableInfo getTableInfoIntern(java.lang.String pWriteBackTable)
                                throws DataSourceException
Returns the meta data information for the specified query, and configures all columns with defaults.

Overrides:
getTableInfoIntern in class DBAccess
Parameters:
pWriteBackTable - the write back table to use for the isWriteable() state (Optional)
Returns:
the meta data for the specified query, and initials all columns.
Throws:
DataSourceException - if an Exception occur during getting the meta data or if the storage is not opened or if one columns SQL type is not supported


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.