spo.src.SPDB.dbAdapter
Class OracleAdapter

java.lang.Object
  |
  +--spo.src.SPDB.dbAdapter.AbstractDatabase
        |
        +--spo.src.SPDB.dbAdapter.OracleAdapter

public class OracleAdapter
extends AbstractDatabase

The Oracle db adapter implementation.


Constructor Summary
OracleAdapter()
           
 
Method Summary
 int createSequence(DBUtil dbutil, java.lang.String tableName)
          Create a sequence
 int dropSequence(DBUtil dbutil, java.lang.String tableName)
          Drop the sequence
 java.lang.String getDateTimeFunction()
          The Oracle's function name that gets the current date and time from the database server: "sysdate"
 java.lang.String getIsNULLFunction()
          The Oracle's function name that is used to return non-NULL value
 java.lang.String getStringDelimiter()
          The Oracles's string delimiter character: single quote (')
 int getUniqueID(DBUtil dbutil, java.lang.String tableName)
          The Oracle unique ID generator through use of sequences The name of the sequence used to generate the unique id is made from the name of the table that uses the id by appending "_id_seq" to it.
 int getUniqueRID(DBUtil dbutil, java.lang.String tableName)
           
 
Methods inherited from class spo.src.SPDB.dbAdapter.AbstractDatabase
createObject, main
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleAdapter

public OracleAdapter()
Method Detail

createSequence

public int createSequence(DBUtil dbutil,
                          java.lang.String tableName)
                   throws java.sql.SQLException
Description copied from class: AbstractDatabase
Create a sequence

Specified by:
createSequence in class AbstractDatabase
Parameters:
tableName - name of the table
java.sql.SQLException

dropSequence

public int dropSequence(DBUtil dbutil,
                        java.lang.String tableName)
                 throws java.sql.SQLException
Description copied from class: AbstractDatabase
Drop the sequence

Specified by:
dropSequence in class AbstractDatabase
Parameters:
tableName - name of the table
java.sql.SQLException

getUniqueID

public int getUniqueID(DBUtil dbutil,
                       java.lang.String tableName)
                throws java.sql.SQLException
The Oracle unique ID generator through use of sequences The name of the sequence used to generate the unique id is made from the name of the table that uses the id by appending "_id_seq" to it. Before a record is inserted in the table, select nextval of that sequence can return the generated key in the same db connection.

Specified by:
getUniqueID in class AbstractDatabase
Parameters:
tableName - the name of table which unique id was generate
java.sql.SQLException

getUniqueRID

public int getUniqueRID(DBUtil dbutil,
                        java.lang.String tableName)
                 throws java.sql.SQLException
Specified by:
getUniqueRID in class AbstractDatabase
java.sql.SQLException

getDateTimeFunction

public java.lang.String getDateTimeFunction()
The Oracle's function name that gets the current date and time from the database server: "sysdate"

Specified by:
getDateTimeFunction in class AbstractDatabase

getIsNULLFunction

public java.lang.String getIsNULLFunction()
The Oracle's function name that is used to return non-NULL value

Specified by:
getIsNULLFunction in class AbstractDatabase

getStringDelimiter

public java.lang.String getStringDelimiter()
The Oracles's string delimiter character: single quote (')

Specified by:
getStringDelimiter in class AbstractDatabase
Returns:
return the string delimiter


Copyright © 2003 UKCS. All Rights Reserved.