net.sourceforge.pbeans.data
Class GenericDatabase

java.lang.Object
  extended by net.sourceforge.pbeans.data.AbstractDatabase
      extended by net.sourceforge.pbeans.data.GenericDatabase
All Implemented Interfaces:
Database

Deprecated. No longer used.

public class GenericDatabase
extends AbstractDatabase

A database abstraction for an RDBMS unknown to DefaultDatabaseFactory.


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sourceforge.pbeans.data.AbstractDatabase
AbstractDatabase.TypeInfo
 
Field Summary
 
Fields inherited from class net.sourceforge.pbeans.data.AbstractDatabase
sqlStateType
 
Constructor Summary
GenericDatabase()
          Deprecated.  
 
Method Summary
protected  java.sql.PreparedStatement getAutoIncrementRetrievalStatement(java.sql.Connection c)
          Deprecated. Gets a PreparedStatement instance that can be used to retrieve the auto-increment value of a record just inserted.
protected  java.sql.PreparedStatement[] getChangeFieldStatements(java.sql.Connection c, java.lang.String tableName, FieldDescriptor fd, boolean autoIncrement)
          Deprecated. Changes field type and other settings by copying data to a temporary field.
protected  java.sql.PreparedStatement[] getRenameFieldStatements(java.sql.Connection c, java.lang.String tableName, java.lang.String oldName, FieldDescriptor fd, boolean autoIncrement)
          Deprecated. Renames field and changes other settings by copying data to a temporary field.
 void init(javax.sql.DataSource dataSource)
          Deprecated. Override this method to obtain metadata information, such as the JDBC URL.
 boolean isDuplicateEntryError(java.sql.SQLException se)
          Deprecated. Checks for SQL state 23505 in case SQL99 codes are supported, otherwise makes assumptions based on exception message.
 
Methods inherited from class net.sourceforge.pbeans.data.AbstractDatabase
autoIncrementColumnNumber, autoIncrementDeclaration, beginTransaction, canSetNullableOnTableAlter, endTransaction, ensureTableExists, ensureTableExists, getAutomaticPrimaryKeyIndexName, getBeanIterator, getBeanWrapper, getConnectionWrapper, getCreateFieldStatements, getCreateIndexStatements, getCreateTableStatement, getDropIndexStatements, getMaxColumnNameLength, getMaxTableNameLength, getRemoveFieldStatement, getResultSetValue, getTypeDeclaration, initDatabaseInfo, insert, inTransaction, isBlob, isDecimal, isLong, isText, isTiny, normalizeIndex, normalizeName, query, releaseConnectionWrapper, relinquishLock, requestLock, requiresKeyLength, rollback, setConnectionTimeout, setMaxConnections, setParameter, setSavepoint, shouldCloseConnectionAfterTransaction, supportsAutoIncrement, typesMatch, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericDatabase

public GenericDatabase()
                throws java.sql.SQLException
Deprecated. 
Throws:
java.sql.SQLException
Method Detail

init

public void init(javax.sql.DataSource dataSource)
          throws java.sql.SQLException
Deprecated. 
Description copied from class: AbstractDatabase
Override this method to obtain metadata information, such as the JDBC URL. Implementations for "odbc" and "datadirect" should override this. Note that the override must invoke the super implementation.

Specified by:
init in interface Database
Overrides:
init in class AbstractDatabase
Parameters:
dataSource - A DataSource instance.
Throws:
java.sql.SQLException

getAutoIncrementRetrievalStatement

protected java.sql.PreparedStatement getAutoIncrementRetrievalStatement(java.sql.Connection c)
                                                                 throws java.sql.SQLException
Deprecated. 
Description copied from class: AbstractDatabase
Gets a PreparedStatement instance that can be used to retrieve the auto-increment value of a record just inserted.

Specified by:
getAutoIncrementRetrievalStatement in class AbstractDatabase
Parameters:
c - A Connection instance.
Throws:
java.sql.SQLException

getChangeFieldStatements

protected java.sql.PreparedStatement[] getChangeFieldStatements(java.sql.Connection c,
                                                                java.lang.String tableName,
                                                                FieldDescriptor fd,
                                                                boolean autoIncrement)
                                                         throws java.sql.SQLException
Deprecated. 
Changes field type and other settings by copying data to a temporary field.

Specified by:
getChangeFieldStatements in class AbstractDatabase
Throws:
java.sql.SQLException

getRenameFieldStatements

protected java.sql.PreparedStatement[] getRenameFieldStatements(java.sql.Connection c,
                                                                java.lang.String tableName,
                                                                java.lang.String oldName,
                                                                FieldDescriptor fd,
                                                                boolean autoIncrement)
                                                         throws java.sql.SQLException
Deprecated. 
Renames field and changes other settings by copying data to a temporary field.

Specified by:
getRenameFieldStatements in class AbstractDatabase
Throws:
java.sql.SQLException

isDuplicateEntryError

public boolean isDuplicateEntryError(java.sql.SQLException se)
Deprecated. 
Checks for SQL state 23505 in case SQL99 codes are supported, otherwise makes assumptions based on exception message.

Specified by:
isDuplicateEntryError in interface Database
Specified by:
isDuplicateEntryError in class AbstractDatabase