|
© 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.OracleDatabase
Provides partial implementation of common functionality for Oracle JDBC drivers. Base class for Oracle driver-specific Database instances to support reading/writing of BLOB/CLOB data.
GenericDatabase
Constructor Summary | |
OracleDatabase(Connection connection)
|
Method Summary | |
Clob |
getClobLocator(Connection con,
String tableName,
String clobColumnName,
String whereClause)
|
Clob |
getClobLocatorForAdBucket(Connection con,
String tableName,
String clobColumnName,
String whereClause,
String[] bindVars)
|
String |
getEmptyBlobInitializer()
Returns the String required to initialize a BlobLocator object in an Oracle database. |
String |
getEmptyClobInitializer()
|
boolean |
setClob(PreparedStatement stmt,
int index,
Clob clob,
String data)
Write to a CLOB. |
protected void |
trimClob(Clob clob,
long newLength)
Trim a CLOB to desired size. |
void |
updateClob(ClobKey key,
String data)
Updates a CLOB in the database managed tables for CLOB persistence |
Methods inherited from class com.bea.p13n.util.jdbc.GenericDatabase |
accept, close, close, close, close, close, close, close, close, close, commitConnection, createPreparedStatement, endBlob, endClob, getApplicationName, getBlob, getBlobLocator, getClob, getClobTableName, getConnection, getName, getProperty, printSqlWarning, readFromClob, readFromClob, setClob, 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 OracleDatabase(Connection connection)
Method Detail |
public Clob getClobLocator(Connection con, String tableName, String clobColumnName, String whereClause) throws SQLException
getClobLocator
in interface Database
getClobLocator
in class GenericDatabase
SQLException
public Clob getClobLocatorForAdBucket(Connection con, String tableName, String clobColumnName, String whereClause, String[] bindVars) throws SQLException
SQLException
public String getEmptyBlobInitializer() throws SQLException
getEmptyBlobInitializer
in interface Database
getEmptyBlobInitializer
in class GenericDatabase
SQLException
- on an error.public String getEmptyClobInitializer() throws SQLException
getEmptyClobInitializer
in interface Database
getEmptyClobInitializer
in class GenericDatabase
SQLException
public boolean setClob(PreparedStatement stmt, int index, Clob clob, String data) throws SQLException
setClob
in interface Database
setClob
in class GenericDatabase
stmt
- the PreparedStatementindex
- the paramater indexclob
- the CLOB locator
SQLException
- on an errorprotected void trimClob(Clob clob, long newLength) throws SQLException
If the newLength is greater than or equal to the current CLOB length (determined from Clob.length()) then nothing is done.
This trim is required because Oracle has some strange behavior for CLOB UPDATEs:
If you use UPDATE to put a small CLOB into a field that contains a larger CLOB, then the CLOB size remains unchanged. In other words, the new small CLOB data overlaps the large CLOB data and the end of the CLOB consists of the old data from the end of the large CLOB.
SQLException
public void updateClob(ClobKey key, String data) throws SQLException
SQLException
|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |