© 2002 BEA Systems, Inc.


com.bea.p13n.util.jdbc
Class OracleThinDatabase

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

public class OracleThinDatabase
extends OracleDatabase

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

See Also:
OracleDatabase

Constructor Summary
OracleThinDatabase(java.sql.Connection connection)
           
 
Method Summary
 boolean accept(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 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, updateClob
 
Methods inherited from class com.bea.p13n.util.jdbc.GenericDatabase
close, close, close, close, close, close, commitConnection, createClobKey, createPreparedStatement, endClob, getApplicationName, getClobTableName, getConnection, getProperty, insertClob, printSqlWarning, readClob, readFromClob, readFromClob, removeClob, setClob, startClob, writeToClob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleThinDatabase

public OracleThinDatabase(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

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)

getName

public java.lang.String getName()

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

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved