|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.p13n.util.jdbc.GenericDatabase com.bea.p13n.util.jdbc.OracleDatabase
@Deprecated public abstract class 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)
Deprecated |
Method Summary | |
---|---|
Clob |
getClobLocator(Connection con,
String tableName,
String clobColumnName,
String whereClause)
Deprecated |
Clob |
getClobLocatorForAdBucket(Connection con,
String tableName,
String clobColumnName,
String whereClause,
String[] bindVars)
Deprecated |
String |
getEmptyBlobInitializer()
Deprecated Returns the String required to initialize a BlobLocator object in an Oracle database. |
String |
getEmptyClobInitializer()
Deprecated |
boolean |
setClob(PreparedStatement stmt,
int index,
Clob clob,
String data)
Deprecated Write to a CLOB. |
protected void |
trimClob(Clob clob,
long newLength)
Deprecated Trim a CLOB to desired size. |
void |
updateClob(ClobKey key,
String data)
Deprecated 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 void updateClob(ClobKey key, String data) throws SQLException
SQLException
public String getEmptyClobInitializer() throws SQLException
getEmptyClobInitializer
in interface Database
getEmptyClobInitializer
in class GenericDatabase
SQLException
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 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 locatorstr
- the string value
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 String getEmptyBlobInitializer() throws SQLException
getEmptyBlobInitializer
in interface Database
getEmptyBlobInitializer
in class GenericDatabase
SQLException
- on an error.
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |