Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

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

All Implemented Interfaces:
  Database

public class SetStringDatabase
extends GenericDatabase

Constructor Summary
`SetStringDatabase(Connection connection)`

Method Summary
`boolean` | `commitConnection(Connection connection)`
`String` | `getClob(ResultSet rs, int index)` Get the value of a CLOB column as a string.
`String` | `getName()` The name of this GenericDatabase instance.
`boolean` | `setClob(PreparedStatement stmt, int index, Clob clob, String str)` 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)` Set the value of a CLOB column with a string.

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

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

Constructor Detail

### SetStringDatabase

    public SetStringDatabase(Connection connection)

Method Detail

### commitConnection

    public boolean commitConnection(Connection connection)
                             throws SQLException

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

### getClob

    public String getClob(ResultSet rs,
                          int index)
                   throws SQLException

  Description copied from interface: `Database`
  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.

  If no JdbcHelperDelegate is specified in the console (configured via JdbcHelperMBean) then this method will return a string obtained using the default method that was used before a delegate model was implemented for this class. That method uses Clob.getCharacterStream() to construct a BufferedReader that is read in with the readLine() method.

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

### getName

    public String getName()

  Description copied from class: `GenericDatabase`
  The name of this GenericDatabase instance.

  Specified by:
    `getName` in interface `Database`
  Overrides:
    `getName` in class `GenericDatabase`
  Returns:
    the name of the database

### setClob

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

  Description copied from interface: `Database`
  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.

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

### setClob

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

  Description copied from interface: `Database`
  Set the value of a CLOB column with a string.

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

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved