Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.util.jdbc
Class OracleDatabase

    java.lang.Object
      com.bea.p13n.util.jdbc.GenericDatabase
          com.bea.p13n.util.jdbc.OracleDatabase

All Implemented Interfaces
  Database

Direct Known Subclasses:
  OracleThinDatabase, WlsOracleThinDatabase

Deprecated No longer needed, as JDBC methods work with all supported drivers

    @Deprecated
    public abstract class OracleDatabase

extends GenericDatabase

Provides partial implementation of common functionality for Oracle JDBC drivers. Base class for Oracle driver-specific Database instances to support reading/writing of BLOB/CLOB data.

See Also
  `GenericDatabase`

Constructor Summary
`OracleDatabase(Connection connection)` Deprecated

Method Summary
`Clob` | `getClobLocator(Connection con, String tableName, String clobColumnName, String whereClause)` Deprecated
`Clob` | `getClobLocatorForAdBucket(Connection con, String tableName, String clobColumnName, String whereClause, String[] bindVars)` Deprecated
`String` | `getEmptyBlobInitializer()` Deprecated Returns the String required to initialize a BlobLocator object in an Oracle database.
`String` | `getEmptyClobInitializer()` Deprecated
`boolean` | `setClob(PreparedStatement stmt, int index, Clob clob, String data)` Deprecated Write to a CLOB.
`protected void` | `trimClob(Clob clob, long newLength)` Deprecated Trim a CLOB to desired size.
`void` | `updateClob(ClobKey key, String data)` Deprecated Updates a CLOB in the database managed tables for CLOB persistence

Methods inherited from class com.bea.p13n.util.jdbc.GenericDatabase
`accept, close, close, close, close, close, close, close, close, close, commitConnection, createPreparedStatement, endBlob, endClob, getApplicationName, getBlob, getBlobLocator, getClob, getClobTableName, getConnection, getName, getProperty, printSqlWarning, readFromClob, readFromClob, setClob, startBlob, startClob, writeToClob, writeToClob`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OracleDatabase

    public OracleDatabase(Connection connection)

  Deprecated

Method Detail

### updateClob

    public void updateClob(ClobKey key,
                           String data)
                    throws SQLException

  Deprecated
  Updates a CLOB in the database managed tables for CLOB persistence

  Throws
    `SQLException`

### getEmptyClobInitializer

    public String getEmptyClobInitializer()
                                   throws SQLException

  Deprecated
  Specified by:
    `getEmptyClobInitializer` in interface `Database`
  Overrides:
    `getEmptyClobInitializer` in class `GenericDatabase`
  Throws
    `SQLException`

### getClobLocator

    public Clob getClobLocator(Connection con,
                               String tableName,
                               String clobColumnName,
                               String whereClause)
                        throws SQLException

  Deprecated
  Specified by:
    `getClobLocator` in interface `Database`
  Overrides:
    `getClobLocator` in class `GenericDatabase`
  Throws
    `SQLException`

### getClobLocatorForAdBucket

    public Clob getClobLocatorForAdBucket(Connection con,
                                          String tableName,
                                          String clobColumnName,
                                          String whereClause,
                                          String[] bindVars)
                                   throws SQLException

  Deprecated
  Throws
    `SQLException`

### setClob

    public boolean setClob(PreparedStatement stmt,
                           int index,
                           Clob clob,
                           String data)
                    throws SQLException

  Deprecated
  Write to a CLOB. Write the input stream containing the ASCII data associated with the passed String to the CLOB's output stream. Streams support for updating CLOB columns is not addressed by JDBC 2.0 so this method uses an extension implemented in the delegate. This will always return false, since the Clob is written directly to the database.

  Specified by:
    `setClob` in interface `Database`
  Overrides:
    `setClob` in class `GenericDatabase`
  Parameters
    `stmt` - the PreparedStatement
    `index` - the paramater index
    `clob` - the CLOB locator
    `str` - the string value
  Returns
    boolean executeRequired. If false then a delegate was used to directly set the CLOB in the database without using the PreparedStatement. If true then no delegate was used, or the delegate set the Clob value on the statement and the PreparedStatement must be executed to update the database.
  Throws
    `SQLException` - on an error

### trimClob

    protected void trimClob(Clob clob,
                            long newLength)
                     throws SQLException

  Deprecated
  Trim a CLOB to desired size. This method does not commit the connection. In normal use, you will call this method with a connection that has auto-commit disabled. After you have called this method with such a connection you can then commit it (if you are finished with the CLOB).

  If the newLength is greater than or equal to the current CLOB length (determined from Clob.length()) then nothing is done.

  This trim is required because Oracle has some strange behavior for CLOB UPDATEs:

  If you use UPDATE to put a small CLOB into a field that contains a larger CLOB, then the CLOB size remains unchanged. In other words, the new small CLOB data overlaps the large CLOB data and the end of the CLOB consists of the old data from the end of the large CLOB.

  Throws
    `SQLException`

### getEmptyBlobInitializer

    public String getEmptyBlobInitializer()
                                   throws SQLException

  Deprecated
  Returns the String required to initialize a BlobLocator object in an Oracle database. Since you modify the BlobLocator object in the database instead of writing to the column directly, this helps to identify the method used to create one in a PreparedStatement such as INSERT INTO BLOB_TABLE ( ID, BLOBS ) VALUES ( ?, empty_blob() ).

  Specified by:
    `getEmptyBlobInitializer` in interface `Database`
  Overrides:
    `getEmptyBlobInitializer` in class `GenericDatabase`
  Returns
    String method used to create a BlobLocator in an Oracle database.
  Throws
    `SQLException` - on an error.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.