com.objectwave.persist.broker
Class OracleBroker

java.lang.Object
  |
  +--com.objectwave.persist.AbstractBroker
        |
        +--com.objectwave.persist.broker.RDBBroker
              |
              +--com.objectwave.persist.broker.OracleBroker
All Implemented Interfaces:
Broker

public class OracleBroker
extends RDBBroker

This will be the place for Oracle specific implementation issues. Special Considerations

  • The oracle type of VARCHAR will not contain empty strings. If a field contains an empty string, this will be returned from the database as 'null'.
  • Version:
    $Id: OracleBroker.java,v 2.3 2002/03/23 13:42:10 dave_hoag Exp $
    Author:
    Dave Hoag

    Nested Class Summary
    static class OracleBroker.Test
              Unit tests.
     
    Nested classes inherited from class com.objectwave.persist.broker.RDBBroker
    RDBBroker.Test
     
    Field Summary
     
    Fields inherited from class com.objectwave.persist.broker.RDBBroker
    broker, brokerPropertySource, connectionPerThread, connectionPool, pool, resultEngine, saveObjectsStrategy, sqlModifyEngine, sqlQueryEngine, statementFactory, threadLocal
     
    Fields inherited from class com.objectwave.persist.AbstractBroker
    exceptionConverter, metrics, props, verbose
     
    Constructor Summary
    OracleBroker()
               
     
    Method Summary
    protected  QueryException convertException(java.sql.SQLException ex, java.lang.String additionalInfo)
              This will ALWAYS return an exception.
     RDBBroker defaultBroker()
              Implemented as an instance method to support method overriding.
    static RDBBroker getDefaultBroker()
              Most systems will have only one database broker.
    protected  java.lang.String getDefaultDriverName()
              Get the fully qualified class name of the preferred database driver.
    protected  PrimaryKeyStrategy getDefaultPrimaryKeyStrategy()
              Gets the DefaultPrimaryKeyStrategy attribute of the OracleBroker object
     void initialize()
              Normally you would use the 'getDefaultBroker' method.
    protected  boolean isSmartBatchEnabled()
               
    protected  RDBConnection newRDBConnection(RDBConnectionPool connectionPool, java.lang.String connectUrl, java.lang.String userName, java.lang.String userPassword)
              Create an RDBConnection instance using the specified configuration.
     
    Methods inherited from class com.objectwave.persist.broker.RDBBroker
    beginTransaction, checkObjectPool, cleanupSelect, close, commit, constrainWhereClause, count, createAttributeSelect, customizeDetail, defineSelectList, delete, deleteAll, deleteObjects, deleteObjects, determinePrimaryKey, dumpSQLException, find, findAttributes, findColumnSqlTypes, findResults, findUnique, finishBuildingQuery, generateInsertValues, getBrokerPropertySource, getConnection, getObjectPool, getRDBAdapter, initConfiguration, initializeConnections, initializeConnections, initializeObjectPooling, insert, main, nextPrimaryKey, removeObjectPooling, rollback, save, saveObjects, setBrokerPropertySource, setDriver, setObjectPool, setUsingObjectPool, update, update
     
    Methods inherited from class com.objectwave.persist.AbstractBroker
    convertException, getExceptionConverter, println, setBrokerProperty, setExceptionConverter
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    OracleBroker

    public OracleBroker()
    Method Detail

    getDefaultBroker

    public static RDBBroker getDefaultBroker()
    Most systems will have only one database broker. This method is used to support systems of that type.

    Returns:
    The DefaultBroker value

    isSmartBatchEnabled

    protected final boolean isSmartBatchEnabled()
    Returns:
    The SmartBatchEnabled value

    getDefaultDriverName

    protected java.lang.String getDefaultDriverName()
    Get the fully qualified class name of the preferred database driver.

    Overrides:
    getDefaultDriverName in class RDBBroker
    Returns:
    java.lang.String

    getDefaultPrimaryKeyStrategy

    protected PrimaryKeyStrategy getDefaultPrimaryKeyStrategy()
    Gets the DefaultPrimaryKeyStrategy attribute of the OracleBroker object

    Overrides:
    getDefaultPrimaryKeyStrategy in class RDBBroker
    Returns:
    The DefaultPrimaryKeyStrategy value

    initialize

    public void initialize()
    Description copied from class: RDBBroker
    Normally you would use the 'getDefaultBroker' method. In addition to creating a RDBBroker instance, it will initialize the JDBC Driver and the defaultTransactionLog. This method is public for the ISOLATED instances where it is necessary to create a custom broker. Avoid using this method.

    Overrides:
    initialize in class RDBBroker
    See Also:
    com.objectwave.persist.Broker#getDefaultBroker

    defaultBroker

    public RDBBroker defaultBroker()
    Implemented as an instance method to support method overriding.

    Overrides:
    defaultBroker in class RDBBroker
    Returns:
    com.objectwave.persist.RDBBroker or a subclass.
    See Also:
    BrokerFactory

    newRDBConnection

    protected RDBConnection newRDBConnection(RDBConnectionPool connectionPool,
                                             java.lang.String connectUrl,
                                             java.lang.String userName,
                                             java.lang.String userPassword)
    Description copied from class: RDBBroker
    Create an RDBConnection instance using the specified configuration.

    Overrides:
    newRDBConnection in class RDBBroker
    Parameters:
    connectionPool - Description of Parameter
    connectUrl - Description of Parameter
    userName - Description of Parameter
    userPassword - Description of Parameter
    Returns:
    Description of the Returned Value

    convertException

    protected QueryException convertException(java.sql.SQLException ex,
                                              java.lang.String additionalInfo)
    Description copied from class: AbstractBroker
    This will ALWAYS return an exception. This allows an Exception converter to be installed into the broker. This converter can change exception to specific exception types based upon database error codes. This would, obviously, be database specific and hence why it is not part of RDBBroker.

    Overrides:
    convertException in class AbstractBroker
    Parameters:
    ex - Description of Parameter
    additionalInfo - Description of Parameter
    Returns:
    Description of the Returned Value