Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

OracleDatabase Class Reference

Obsolete class - implementation of Database interface using Oracle v. 7 OCI. Use Oracle8iDatabase instead. More...

#include <cOracleDatabase.h>

Inheritance diagram for OracleDatabase:

Inheritance graph
[legend]
Collaboration diagram for OracleDatabase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OracleDatabase (const char *ConnectString=NULL)
 ~OracleDatabase ()
virtual bool Commit ()
virtual bool Rollback ()
virtual class ConnectionConnect (const char *UserName, const char *Password)
virtual bool WriteDDL (std::ofstream &S)
virtual char * ColumnTypeDDL (char colType, int colLength)

Protected Member Functions

virtual bool _Commit ()
virtual bool _Rollback ()

Detailed Description

Obsolete class - implementation of Database interface using Oracle v. 7 OCI. Use Oracle8iDatabase instead.

Warning:
This class creates connections of type OracleConnection and uses cursors of type OracleCursor. These cursors don't correctly implement methods Cursor::_PreExecBind(const char *,const int,const void *,const int,const IopcDataType,bool) and Cursor::_PreFetchBind(const int,const void *,const int,const IopcDataType,bool *).
This class was nearly undocumented in POLiTe - a few of old comments can be found in source code - not in doxygen. I (Josef Troch) have added some comments, but persistence layer IOPC does not use this class!


Constructor & Destructor Documentation

OracleDatabase::OracleDatabase const char *  ConnectString = NULL  ) 
 

OracleDatabase::~OracleDatabase  ) 
 


Member Function Documentation

bool OracleDatabase::Commit  )  [virtual]
 

Saves all modified objects to DB, then performs commit on all connections to the database.

Reimplemented from Database.

bool OracleDatabase::Rollback  )  [virtual]
 

Performs rollback on all connections to the database, then destroys all copies in memory.

Reimplemented from Database.

class Connection * OracleDatabase::Connect const char *  UserName,
const char *  Password
[virtual]
 

Creates new connection to the database

After successful connection this function should call afterConnectHandler if runAfterConnectHandler is set.

Implementation should return ObjLibException_ConnectionError in case of error.

Parameters:
UserName User name to connect as.
Password Password for user UserName.
Returns:
Created Connection object.

Implements Database.

bool OracleDatabase::WriteDDL std::ofstream &  S  )  [virtual]
 

Generates DDL statements needed for old POLiTe style persistence to work

Obsolete function. IopcPersistentObject ancestors don't need this generated DDL statements. So you can make fake implementation of this function if you don't need to support POLiTe-style persistent classes.

Parameters:
S Stream to output DDL statements into.

Implements Database.

char * OracleDatabase::ColumnTypeDDL char  colType,
int  colLength
[virtual]
 

Returns correct database column type for given attribute type.

Obsolete function used by POLiTe-style persistent classes. IopcPersistentObject ancestors don't use this function. So you can make fake implementation of this function if you don't need to support POLiTe-style persistent classes.

Parameters:
colType Type of the attribute (TYPE_INT etc.)
colLength Length of the attribute (for int-s etc. sizeof())
See also:
DatabaseSqlStatements::getRecommendedColumnType()

Implements Database.

bool OracleDatabase::_Commit  )  [protected, virtual]
 

Performs commit on all connections to the database immediately (modified objects are not saved into DB).

Reimplemented from Database.

bool OracleDatabase::_Rollback  )  [protected, virtual]
 

Performs rollback on all connections to the database (doesn't destroy copies in memory).

Reimplemented from Database.


The documentation for this class was generated from the following files:
Generated on Wed Aug 11 22:36:09 2004 for IOPC by Doxygen 1.3.6