net.wgen.op.db.lob
Class OracleLobHandler

java.lang.Object
  extended bynet.wgen.op.db.lob.LobHandler
      extended bynet.wgen.op.db.lob.OracleLobHandler
All Implemented Interfaces:
java.io.Serializable

public class OracleLobHandler
extends LobHandler

Version:
$Id: OracleLobHandler.html,v 1.2 2007/01/28 04:09:37 paulfeuer Exp $
Author:
Paul Feuer, Wireless Generation, Inc.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.wgen.op.db.lob.LobHandler
LOB_CHUNK_SIZE, MAX_LOB_SIZE, MAX_ROWS_ALLOWED, MAX_ROWS_WARNED
 
Constructor Summary
OracleLobHandler()
           
 
Method Summary
 java.sql.Blob makeBlob(java.sql.Connection connection, java.io.InputStream dataStream, int length)
          Make an Oracle BLOB object populated with the given bytes.
 java.sql.Clob makeClob(java.sql.Connection connection, java.lang.String data)
           
 oracle.sql.BLOB makeOracleBLOB(oracle.jdbc.OracleConnection connection, java.io.InputStream dataStream, int length)
          Make an Oracle BLOB object populated with the given bytes.
 oracle.sql.CLOB makeOracleCLOB(oracle.jdbc.OracleConnection connection, java.lang.String data)
          Make an Oracle CLOB object populated with the given text.
 java.lang.String readClob(java.sql.Clob clob)
          Read text from a CLOB into a String
 void setArray(java.sql.PreparedStatement statement, int index, java.lang.Object[] array, java.lang.String arrayDescriptor)
          Set an array value in the statement.
 
Methods inherited from class net.wgen.op.db.lob.LobHandler
readBlob, setBlob, setClob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleLobHandler

public OracleLobHandler()
Method Detail

readClob

public java.lang.String readClob(java.sql.Clob clob)
                          throws java.sql.SQLException,
                                 java.io.IOException
Description copied from class: LobHandler
Read text from a CLOB into a String

Overrides:
readClob in class LobHandler
Parameters:
clob -
Returns:
Throws:
java.sql.SQLException
java.io.IOException

makeClob

public java.sql.Clob makeClob(java.sql.Connection connection,
                              java.lang.String data)
                       throws java.sql.SQLException
Overrides:
makeClob in class LobHandler
Parameters:
connection -
data -
Returns:
the Clob object containing the data
Throws:
java.sql.SQLException

makeOracleCLOB

public oracle.sql.CLOB makeOracleCLOB(oracle.jdbc.OracleConnection connection,
                                      java.lang.String data)
                               throws java.sql.SQLException
Make an Oracle CLOB object populated with the given text. See http://download-east.oracle.com/docs/cd/B10501_01/java.920/a96654/oralob.htm#1043272 "Reading and Writing BLOB and CLOB Data."

Parameters:
connection -
data -
Returns:
the CLOB with the text data
Throws:
java.sql.SQLException

makeBlob

public java.sql.Blob makeBlob(java.sql.Connection connection,
                              java.io.InputStream dataStream,
                              int length)
                       throws java.sql.SQLException
Make an Oracle BLOB object populated with the given bytes.

Overrides:
makeBlob in class LobHandler
Parameters:
connection -
dataStream - the stream from which to read the data
Returns:
the BLOB with the bytes
Throws:
java.sql.SQLException

makeOracleBLOB

public oracle.sql.BLOB makeOracleBLOB(oracle.jdbc.OracleConnection connection,
                                      java.io.InputStream dataStream,
                                      int length)
                               throws java.sql.SQLException
Make an Oracle BLOB object populated with the given bytes. See http://download-east.oracle.com/docs/cd/B10501_01/java.920/a96654/oralob.htm#1043272 "Reading and Writing BLOB and CLOB Data".

Parameters:
connection -
dataStream -
Returns:
the BLOB with the data
Throws:
java.sql.SQLException

setArray

public void setArray(java.sql.PreparedStatement statement,
                     int index,
                     java.lang.Object[] array,
                     java.lang.String arrayDescriptor)
              throws java.sql.SQLException
Set an array value in the statement.

Overrides:
setArray in class LobHandler
Parameters:
statement - the statement in which the array will be set
index - the index in the statement in which the array will be set
array - the array value
arrayDescriptor - name of the array type
Throws:
java.sql.SQLException