|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.p13n.util.jdbc.GenericDatabase
com.bea.p13n.util.jdbc.SetStringDatabase
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 |
public SetStringDatabase(Connection connection)
Method Detail |
public boolean commitConnection(Connection connection) throws SQLException
commitConnection
in interface Database
commitConnection
in class GenericDatabase
SQLException
public String getClob(ResultSet rs, int index) throws SQLException
Database
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.
getClob
in interface Database
getClob
in class GenericDatabase
SQLException
public String getName()
GenericDatabase
getName
in interface Database
getName
in class GenericDatabase
public boolean setClob(PreparedStatement stmt, int index, Clob clob, String str) throws SQLException
Database
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.
setClob
in interface Database
setClob
in class GenericDatabase
SQLException
public void setClob(PreparedStatement stmt, int index, String str) throws SQLException
Database
setClob
in interface Database
setClob
in class GenericDatabase
SQLException
|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |