sqlg2.db
Class OracleDBSpecific

java.lang.Object
  extended by sqlg2.db.OracleDBSpecific
All Implemented Interfaces:
DBSpecific

public final class OracleDBSpecific
extends java.lang.Object
implements DBSpecific

DBSpecific implementation for Oracle.


Constructor Summary
OracleDBSpecific()
           
 
Method Summary
 void freeBlob(java.sql.Connection conn, java.sql.Blob blob)
          Frees BLOB data after return from stored procedure.
 void freeClob(java.sql.Connection conn, java.sql.Clob clob)
          Frees CLOB data after return from stored procedure.
 java.io.OutputStream getBlobOutputStream(java.sql.Blob blob)
          Retrieves stream to write BLOB contents
 java.lang.Class<? extends SqlChecker> getCheckerClass()
          Returns checker of SQL statements for this DB.
 java.io.Writer getClobWriter(java.sql.Clob clob)
          Retrieves stream to write CLOB contents
 int getDateSqlType(java.lang.Class<? extends java.util.Date> cls)
          Determines which of SQL date types to use for given Java Date subclass - Types.DATE, Types.TIME or Types.TIMESTAMP.
static int getDateSqlTypeStatic(java.lang.Class<? extends java.util.Date> cls)
           
 long getNextId(java.sql.Connection conn, java.lang.String sequence)
          Gets next number from sequence
static java.lang.String getNextSeqSql(java.lang.String sequence)
           
 int getResultSetType()
          Returns type code to use for CallableStatement.registerOutParameter(int, int) for cursor OUT parameters.
 java.util.Date getServerDate(java.sql.Connection conn)
          Returns DB server local time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleDBSpecific

public OracleDBSpecific()
Method Detail

getNextSeqSql

public static java.lang.String getNextSeqSql(java.lang.String sequence)

getNextId

public long getNextId(java.sql.Connection conn,
                      java.lang.String sequence)
               throws java.sql.SQLException
Description copied from interface: DBSpecific
Gets next number from sequence

Specified by:
getNextId in interface DBSpecific
sequence - sequence name
Throws:
java.sql.SQLException

freeClob

public void freeClob(java.sql.Connection conn,
                     java.sql.Clob clob)
              throws java.sql.SQLException
Description copied from interface: DBSpecific
Frees CLOB data after return from stored procedure.

Specified by:
freeClob in interface DBSpecific
Throws:
java.sql.SQLException

freeBlob

public void freeBlob(java.sql.Connection conn,
                     java.sql.Blob blob)
              throws java.sql.SQLException
Description copied from interface: DBSpecific
Frees BLOB data after return from stored procedure.

Specified by:
freeBlob in interface DBSpecific
Throws:
java.sql.SQLException

getServerDate

public java.util.Date getServerDate(java.sql.Connection conn)
                             throws java.sql.SQLException
Description copied from interface: DBSpecific
Returns DB server local time.

Specified by:
getServerDate in interface DBSpecific
Returns:
DB server local time
Throws:
java.sql.SQLException

getBlobOutputStream

public java.io.OutputStream getBlobOutputStream(java.sql.Blob blob)
                                         throws java.sql.SQLException
Description copied from interface: DBSpecific
Retrieves stream to write BLOB contents

Specified by:
getBlobOutputStream in interface DBSpecific
Throws:
java.sql.SQLException

getClobWriter

public java.io.Writer getClobWriter(java.sql.Clob clob)
                             throws java.sql.SQLException
Description copied from interface: DBSpecific
Retrieves stream to write CLOB contents

Specified by:
getClobWriter in interface DBSpecific
Throws:
java.sql.SQLException

getDateSqlTypeStatic

public static int getDateSqlTypeStatic(java.lang.Class<? extends java.util.Date> cls)

getDateSqlType

public int getDateSqlType(java.lang.Class<? extends java.util.Date> cls)
Description copied from interface: DBSpecific
Determines which of SQL date types to use for given Java Date subclass - Types.DATE, Types.TIME or Types.TIMESTAMP.

Specified by:
getDateSqlType in interface DBSpecific

getCheckerClass

public java.lang.Class<? extends SqlChecker> getCheckerClass()
Description copied from interface: DBSpecific
Returns checker of SQL statements for this DB. Invoked only at preprocess phase, so this class is not required at run time. Class shoud have default constructor to instantiate.

Specified by:
getCheckerClass in interface DBSpecific

getResultSetType

public int getResultSetType()
Description copied from interface: DBSpecific
Returns type code to use for CallableStatement.registerOutParameter(int, int) for cursor OUT parameters.

Specified by:
getResultSetType in interface DBSpecific