© 2002 BEA Systems, Inc.


com.bea.p13n.util.jdbc
Class WlsOracleThinDatabase

java.lang.Object
  |
  +--com.bea.p13n.util.jdbc.GenericDatabase
        |
        +--com.bea.p13n.util.jdbc.OracleDatabase
              |
              +--com.bea.p13n.util.jdbc.WlsOracleThinDatabase

public class WlsOracleThinDatabase
extends OracleDatabase

Concrete implementation of OracleDatabase that provides support for reading/writing of CLOB data. Designed to work with Oracle Thin driver when running inside an application server context.

See Also:
OracleDatabase

Constructor Summary
WlsOracleThinDatabase(java.sql.Connection connection)
           
 
Method Summary
 boolean accept(java.sql.Connection connection)
           
 boolean commitConnection(java.sql.Connection connection)
           
 java.lang.String getClob(java.sql.ResultSet rs, int index)
          Retrieve CLOB value as a String of Unicode characters.
 java.lang.String getName()
           
 void insertClob(ClobKey key, java.lang.String data)
          Inserts a CLOB into the database managed tables for CLOB persistence
 java.lang.String readClob(ClobKey key)
          Reads a CLOB into the database managed tables for CLOB persistence
 void removeClob(ClobKey key)
          Removes a CLOB from the database managed tables for CLOB persistence
 void updateClob(ClobKey key, java.lang.String data)
          Updates a CLOB in the database managed tables for CLOB persistence
 void writeToClob(java.sql.Clob clob, java.lang.String data)
          Writes the data from the String into the Clob.
 
Methods inherited from class com.bea.p13n.util.jdbc.OracleDatabase
getClobLocator, getEmptyClobInitializer, setClob, trimClob
 
Methods inherited from class com.bea.p13n.util.jdbc.GenericDatabase
close, close, close, close, close, close, createClobKey, createPreparedStatement, endClob, getApplicationName, getClobTableName, getConnection, getProperty, printSqlWarning, readFromClob, readFromClob, setClob, startClob, writeToClob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WlsOracleThinDatabase

public WlsOracleThinDatabase(java.sql.Connection connection)
Method Detail

accept

public boolean accept(java.sql.Connection connection)

Returns:
true if this Database can bind to the supplied connection. Typically the Database will examine the Connection MetaData to determine suitability.
Overrides:
accept in class GenericDatabase

writeToClob

public void writeToClob(java.sql.Clob clob,
                        java.lang.String data)
                 throws java.sql.SQLException
Writes the data from the String into the Clob.

Overrides:
writeToClob in class GenericDatabase

insertClob

public void insertClob(ClobKey key,
                       java.lang.String data)
                throws java.sql.SQLException
Inserts a CLOB into the database managed tables for CLOB persistence

Overrides:
insertClob in class GenericDatabase

removeClob

public void removeClob(ClobKey key)
                throws java.sql.SQLException
Removes a CLOB from the database managed tables for CLOB persistence

Overrides:
removeClob in class GenericDatabase

updateClob

public void updateClob(ClobKey key,
                       java.lang.String data)
                throws java.sql.SQLException
Updates a CLOB in the database managed tables for CLOB persistence

Overrides:
updateClob in class OracleDatabase

readClob

public java.lang.String readClob(ClobKey key)
                          throws java.sql.SQLException
Reads a CLOB into the database managed tables for CLOB persistence

Overrides:
readClob in class GenericDatabase

getName

public java.lang.String getName()

Returns:
the name of the database
Overrides:
getName in class GenericDatabase

getClob

public java.lang.String getClob(java.sql.ResultSet rs,
                                int index)
                         throws java.sql.SQLException
Retrieve CLOB value as a String of Unicode characters.

Parameters:
rs - the resultset containing the clob
index - the position of the clob in the resultset
Returns:
the value of the CLOB as a String.
Throws:
java.sql.SQLException - on an error
Overrides:
getClob in class GenericDatabase
See Also:
getClob(ResultSet rs, int index)

commitConnection

public boolean commitConnection(java.sql.Connection connection)
                         throws java.sql.SQLException

Overrides:
commitConnection in class GenericDatabase

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved