to.etc.dbutil
Class OracleDB

java.lang.Object
  extended by to.etc.dbutil.BaseDB
      extended by to.etc.dbutil.OracleDB

public class OracleDB
extends BaseDB


Constructor Summary
OracleDB()
           
 
Method Summary
protected  java.lang.String getCheckString()
          Returns a SQL statement that is the cheapest way to check the validity of a connection.
protected  int getFullSequenceID(java.sql.Connection dbc, java.lang.String seqname)
          Uses a table sequence to generate a value.
protected  java.io.Reader getLobReader(java.sql.Connection dbc, java.sql.ResultSet rs, int col)
          Returns a Reader from the blob (clob) column specified.
protected  java.io.Reader getLobReader(java.sql.Connection dbc, java.sql.ResultSet rs, java.lang.String col)
          Returns a Reader from the blob (clob) column specified.
protected  java.io.InputStream getLobStream(java.sql.Connection dbc, java.sql.ResultSet rs, int col)
          Returns an InputStream from the blob (clob) column specified.
protected  java.io.InputStream getLobStream(java.sql.Connection dbc, java.sql.ResultSet rs, java.lang.String col)
          Returns an InputStream from the blob (clob) column specified.
protected  int getSequenceID(java.sql.Connection dbc, java.lang.String tablename)
          Uses a table sequence to generate a value.
 boolean oracleOuterJoin()
           
protected  void setBlob_old(java.sql.Connection dbc, java.lang.String table, java.lang.String column, java.lang.String where, java.io.InputStream is, int len)
          Writes a blob to the requested record.
protected  void setBlob(java.sql.Connection dbc, java.lang.String table, java.lang.String column, java.lang.String[] pkfields, java.lang.Object[] key, java.io.InputStream is)
          Writes a blob to the requested record.
protected  void setBlob(java.sql.Connection dbc, java.lang.String table, java.lang.String column, java.lang.String where, byte[][] data)
           
protected  void setBlob(java.sql.Connection dbc, java.lang.String table, java.lang.String column, java.lang.String where, java.io.InputStream is)
          Writes a blob to the requested record.
protected  void setClob(java.sql.Connection dbc, java.lang.String table, java.lang.String column, java.lang.String where, java.io.Reader r)
           
 
Methods inherited from class to.etc.dbutil.BaseDB
streamCopy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleDB

public OracleDB()
Method Detail

getCheckString

protected java.lang.String getCheckString()
Returns a SQL statement that is the cheapest way to check the validity of a connection.

Specified by:
getCheckString in class BaseDB
Returns:

getSequenceID

protected int getSequenceID(java.sql.Connection dbc,
                            java.lang.String tablename)
                     throws java.sql.SQLException
Uses a table sequence to generate a value.

Specified by:
getSequenceID in class BaseDB
Parameters:
dbc - the connection
Returns:
the id
Throws:
java.sql.SQLException - if the sequence could not be obtained

getFullSequenceID

protected int getFullSequenceID(java.sql.Connection dbc,
                                java.lang.String seqname)
                         throws java.sql.SQLException
Uses a table sequence to generate a value.

Specified by:
getFullSequenceID in class BaseDB
Parameters:
dbc - the connection
Returns:
the id
Throws:
java.sql.SQLException - if the sequence could not be obtained

setBlob

protected void setBlob(java.sql.Connection dbc,
                       java.lang.String table,
                       java.lang.String column,
                       java.lang.String where,
                       java.io.InputStream is)
                throws java.sql.SQLException
Description copied from class: BaseDB
Writes a blob to the requested record.

Specified by:
setBlob in class BaseDB
Throws:
java.sql.SQLException

setBlob

protected void setBlob(java.sql.Connection dbc,
                       java.lang.String table,
                       java.lang.String column,
                       java.lang.String where,
                       byte[][] data)
                throws java.sql.SQLException
Overrides:
setBlob in class BaseDB
Throws:
java.sql.SQLException

setBlob

protected void setBlob(java.sql.Connection dbc,
                       java.lang.String table,
                       java.lang.String column,
                       java.lang.String[] pkfields,
                       java.lang.Object[] key,
                       java.io.InputStream is)
                throws java.sql.SQLException
Writes a blob to the requested record. Works for Oral and MYSQL.

Specified by:
setBlob in class BaseDB
Throws:
java.sql.SQLException

setBlob_old

protected void setBlob_old(java.sql.Connection dbc,
                           java.lang.String table,
                           java.lang.String column,
                           java.lang.String where,
                           java.io.InputStream is,
                           int len)
                    throws java.lang.Exception
Writes a blob to the requested record. Works for Oral and MYSQL.

Throws:
java.lang.Exception

getLobReader

protected java.io.Reader getLobReader(java.sql.Connection dbc,
                                      java.sql.ResultSet rs,
                                      int col)
                               throws java.lang.Exception
Returns a Reader from the blob (clob) column specified.

Specified by:
getLobReader in class BaseDB
Parameters:
rs -
col -
Returns:
Throws:
java.lang.Exception

getLobReader

protected java.io.Reader getLobReader(java.sql.Connection dbc,
                                      java.sql.ResultSet rs,
                                      java.lang.String col)
                               throws java.lang.Exception
Returns a Reader from the blob (clob) column specified.

Specified by:
getLobReader in class BaseDB
Parameters:
rs -
col -
Returns:
Throws:
java.lang.Exception

getLobStream

protected java.io.InputStream getLobStream(java.sql.Connection dbc,
                                           java.sql.ResultSet rs,
                                           int col)
                                    throws java.lang.Exception
Returns an InputStream from the blob (clob) column specified.

Specified by:
getLobStream in class BaseDB
Parameters:
rs -
col -
Returns:
Throws:
java.lang.Exception

getLobStream

protected java.io.InputStream getLobStream(java.sql.Connection dbc,
                                           java.sql.ResultSet rs,
                                           java.lang.String col)
                                    throws java.lang.Exception
Returns an InputStream from the blob (clob) column specified.

Specified by:
getLobStream in class BaseDB
Parameters:
rs -
col -
Returns:
Throws:
java.lang.Exception

oracleOuterJoin

public boolean oracleOuterJoin()
Overrides:
oracleOuterJoin in class BaseDB

setClob

protected void setClob(java.sql.Connection dbc,
                       java.lang.String table,
                       java.lang.String column,
                       java.lang.String where,
                       java.io.Reader r)
                throws java.lang.Exception
Specified by:
setClob in class BaseDB
Throws:
java.lang.Exception