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
Interface Database

All Known Implementing Classes:
  GenericDatabase, OracleDatabase, OracleThinDatabase, SetStringDatabase, WlsOracleThinDatabase

Deprecated No longer needed, as JDBC methods work with all supported drivers. Helper methods are available on `JdbcHelper` for get/set operations on clob data.

    @Deprecated
    public interface Database

Method Summary
`boolean` | `accept(Connection connection)` Deprecated Check to see if the Database can bind to the supplied connection.
`void` | `close()` Deprecated Close the Connection associated with this Database.
`void` | `close(InputStream is)` Deprecated Closes an InputStream.
`void` | `close(OutputStream os)` Deprecated Closes an OutputStream.
`void` | `close(PreparedStatement ps)` Deprecated Closes a PreparedStatement.
`void` | `close(Reader reader)` Deprecated Closes a Reader stream.
`void` | `close(ResultSet rs)` Deprecated Closes a ResultSet.
`void` | `close(ResultSet rs, Statement stmt)` Deprecated Closes a ResultSet and its associated Statement.
`void` | `close(Statement stmt)` Deprecated Closes a Statement.
`void` | `close(Writer writer)` Deprecated Closes a Writer stream.
`boolean` | `commitConnection(Connection connection)` Deprecated
`void` | `endBlob()` Deprecated Call Connection.commit().
`void` | `endClob()` Deprecated Call Connection.commit().
`String` | `getApplicationName()` Deprecated Get the name of the current WebLogic J2EE application or return null if not running within a WebLogic J2EE context.
`byte[]` | `getBlob(ResultSet rs, int index)` Deprecated Get the value of a Blob column as an InputStream.
`OutputStream` | `getBlobLocator(Connection con, String tableName, String blobColumnName, String whereClause)` Deprecated
`String` | `getClob(ResultSet rs, int index)` Deprecated Get the value of a CLOB column as a string.
`Clob` | `getClobLocator(Connection con, String tableName, String clobColumnName, String whereClause)` Deprecated
`Connection` | `getConnection()` Deprecated Return Connection for the current Database instance.
`String` | `getEmptyBlobInitializer()` Deprecated
`String` | `getEmptyClobInitializer()` Deprecated
`String` | `getName()` Deprecated Gets the name of the database instance.
`String` | `readFromClob(Clob clob)` Deprecated Reads the contents of a Clob and returns as a String.
`boolean` | `setClob(PreparedStatement stmt, int index, Clob clob, String str)` Deprecated If there is a delegate, this method uses JdbcHelperDelegate.writeClobData() If this is done, then the PreparedStatement does not need to be used and the return value, executeRequired, is false.
`void` | `setClob(PreparedStatement stmt, int index, String str)` Deprecated Set the value of a CLOB column with a string.
`void` | `startBlob()` Deprecated setAutoCommit( false ) on the Connection.
`void` | `startClob()` Deprecated setAutoCommit( false ) on the Connection.
`void` | `writeToClob(Clob clob, String data)` Deprecated Writes the data from a String into a Clob.

Method Detail

### getConnection

    Connection getConnection()

  Deprecated
  Return Connection for the current Database instance.

  Returns
    The Connection of the current Database instance.

### accept

    boolean accept(Connection connection)

  Deprecated
  Check to see if the Database can bind to the supplied connection.

  Parameters
    `connection` - The Connection object that contains the URL.
  Returns
    Returns boolean after checking if this Database can bind to the supplied connection. Typically the Database will examine the Connection MetaData to determine suitability.

### close

    void close()

  Deprecated
  Close the Connection associated with this Database.

### close

    void close(Reader reader)

  Deprecated
  Closes a Reader stream.

  Parameters
    `reader` - The Reader object to be closed.

### close

    void close(InputStream is)

  Deprecated
  Closes an InputStream.

  Parameters
    `is` - The InputStream object to be closed.

### close

    void close(Writer writer)

  Deprecated
  Closes a Writer stream.

  Parameters
    `writer` - The Writer object to be closed.

### close

    void close(OutputStream os)

  Deprecated
  Closes an OutputStream.

  Parameters
    `os` - The OutputStream object to be closed.

### close

    void close(Statement stmt)

  Deprecated
  Closes a Statement.

  Parameters
    `stmt` - The Statement object to be closed.

### close

    void close(PreparedStatement ps)

  Deprecated
  Closes a PreparedStatement.

  Parameters
    `ps` - The PreparedStatement object to be closed.

### close

    void close(ResultSet rs)

  Deprecated
  Closes a ResultSet.

  Parameters
    `rs` - The ResultSet object to be closed.

### close

    void close(ResultSet rs,
               Statement stmt)

  Deprecated
  Closes a ResultSet and its associated Statement.

  Parameters
    `rs` - The ResultSet object to be closed.
    `stmt` - The Statement object to be closed.

### readFromClob

    String readFromClob(Clob clob)
                        throws SQLException

  Deprecated
  Reads the contents of a Clob and returns as a String.

  Throws
    `SQLException` - Thrown when error occurs while reading Clob.

### writeToClob

    void writeToClob(Clob clob,
                     String data)
                     throws SQLException

  Deprecated
  Writes the data from a String into a Clob.

  Throws
    `SQLException` - Thrown when error occurs while writing to Clob.

### startClob

    void startClob()
                   throws SQLException

  Deprecated
  setAutoCommit( false ) on the Connection.

  Throws
    `SQLException` - Thrown when trying to set auto-commit to false.

### startBlob

    void startBlob()
                   throws SQLException

  Deprecated
  setAutoCommit( false ) on the Connection.

  Throws
    `SQLException` - Thrown when trying to set auto-commit to false.

### endClob

    void endClob()
                 throws SQLException

  Deprecated
  Call Connection.commit().

  Throws
    `SQLException` - Thrown when error occurs while persisting Clob.

### endBlob

    void endBlob()
                 throws SQLException

  Deprecated
  Call Connection.commit().

  Throws
    `SQLException` - Thrown when error occurs while persisting Blob.

### getApplicationName

    String getApplicationName()

  Deprecated
  Get the name of the current WebLogic J2EE application or return null if not running within a WebLogic J2EE context.

  Returns
    The name of the current WebLogic J2EE application.

### getName

    String getName()

  Deprecated
  Gets the name of the database instance.

  Returns
    The name of the database instance.

### getEmptyClobInitializer

    String getEmptyClobInitializer()
                                   throws SQLException

  Deprecated
  Throws
    `SQLException`

### getClobLocator

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

  Deprecated
  Throws
    `SQLException`

### getClob

    String getClob(ResultSet rs,
                   int index)
                   throws SQLException

  Deprecated
  Get the value of a CLOB column as a string.

  This method will only return the value of the CLOB in the current row of the ResultSet. This method does not increment the ResultSet cursor. You must use ResultSet.next() to increment the cursor before calling this method. This allows the method to be used to process multi-row ResultSets.

  Parameters
    `rs` - the result set.
    `index` - the column index in the result set.
  Returns
    the column as a string.
  Throws
    `SQLException` - thrown on an error.

### setClob

    void setClob(PreparedStatement stmt,
                 int index,
                 String str)
                 throws SQLException

  Deprecated
  Set the value of a CLOB column with a string.

  Parameters
    `stmt` - the prepared statement.
    `index` - the column index.
    `str` - the CLOB string.
  Throws
    `SQLException` - thrown on an error.

### setClob

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

  Deprecated
  If there is a delegate, this method uses JdbcHelperDelegate.writeClobData() If this is done, then the PreparedStatement does not need to be used and the return value, executeRequired, is false. The CLOB should be first located with getClobLocator() If there is no delegate, then this method ignores the Clob argument and sets the value of the String into the CLOB placeholder in the PreparedStatement with setClob(PreparedStatement stmt, int index, String str) and returns executeRequired = true.

  WARNING: if using a delegate to stream data to a CLOB, then you should have used Connection.setAutoCommit(false) before calling the CLOB locator method that provided the Clob you are using in this method call. This will make the CLOB available across multiple SQL statements.

  Parameters
    `stmt` - the prepared statement.
    `index` - the column index.
    `clob` - the CLOB locator (ignored if no delegate).
    `str` - the String to be set in the CLOB (if delegate) or in the PreparedStatement (if no delegate)
  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` - thrown on an error.

### commitConnection

    boolean commitConnection(Connection connection)
                             throws SQLException

  Deprecated
  Throws
    `SQLException`

### getEmptyBlobInitializer

    String getEmptyBlobInitializer()
                                   throws SQLException

  Deprecated
  Throws
    `SQLException`

### getBlobLocator

    OutputStream getBlobLocator(Connection con,
                                String tableName,
                                String blobColumnName,
                                String whereClause)
                                throws SQLException

  Deprecated
  Throws
    `SQLException`

### getBlob

    byte[] getBlob(ResultSet rs,
                   int index)
                   throws SQLException

  Deprecated
  Get the value of a Blob column as an InputStream.

  This method will only return the value of the Blob in the current row of the ResultSet. This method does not increment the ResultSet cursor. You must use ResultSet.next() to increment the cursor before calling this method. This allows the method to be used to process multi-row ResultSets.

  Parameters
    `rs` - The result set.
    `index` - The column index in the ResultSet.
  Returns
    An InputStream representing the column Blob.
  Throws
    `SQLException` - thrown 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.