Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

cOracleConnection.h

Go to the documentation of this file.
00001 /******************************************************************************/
00002 /*                                                                            */
00003 /* POLiTe - Persistent Object Library Test                                    */
00004 /*                                        Ph.D. Thesis by Mgr. Michal Kopecky */
00005 /*                                                                            */
00006 /* Charles University Prague                                                  */
00007 /*                                                                            */
00008 /******************************************************************************/
00009 /*                                                                            */
00010 /* File name: ...                                                             */
00011 /* Module: ......                                                             */
00012 /*                                                                            */
00013 /******************************************************************************/
00014 
00015 #ifndef __C_ORACLECONNECTION_H__
00016 #define __C_ORACLECONNECTION_H__
00017 
00018 // OCI Interface Header
00019 #include <lOracle.h>    //OCI interface for database emulation
00020 
00021 // Common POLiTe Header(s)
00022 #include <lTypes.h>
00023 #include <lExceptions.h>
00024 
00025 // Parent Header(s)
00026 #include <cConnection.h> // Connection class
00027 
00028 class DLL_External OracleConnection : public Connection
00029 {
00030 #ifdef POLITE_TEST_FRIEND
00031         friend POLITE_TEST_FRIEND;
00032 #endif // POLITE_TEST_FRIEND
00033 
00034 friend class OracleDatabase;
00035 friend class OracleCursor;
00036 
00037 protected:
00038          /*volatile*/ Lda_Def _LDA; //Oracle Logon Data Area
00039          /*volatile*/ ub1 _HDA[HDA_SIZE]; //Oracle Host Data Area
00040          OracleConnection(
00041                 class Database *DB,
00042                 const char *UserName,
00043                 const char *Password,
00044                 const int LocHandle,
00045                 const int GlobHandle
00046                 );
00047 
00048 public:
00049         virtual ~OracleConnection();
00050 
00051 protected:
00052         virtual bool _Sql(const char * const SqlCommand);
00053         virtual bool _Commit();
00054         virtual bool _Rollback();
00055         virtual bool _Savepoint(const char * const Name);
00056         virtual bool _RollbackToSavepoint(const char * const Name);
00057 
00058         virtual bool _NextOID(long int &nxtoid, long int &nxtsn);
00059         // generates new OID and Serial Number for new object
00060         virtual bool _NextSN(long int curoid, long int &nxtsn);
00061         // generates new Serial Number for object
00062 
00063 public:
00064         virtual bool Sql(const char * const SqlCommand);
00065         virtual bool Commit();
00066         virtual bool Rollback();
00067         virtual bool Savepoint(const char *Name);
00068         virtual bool RollbackToSavepoint(const char *Name);
00069         virtual bool Disconnect();
00070         virtual bool Abort();
00071         virtual bool Autocommit(bool ac);
00072 
00073 //Obtaining of the new cursor
00074 protected:
00075         virtual Cursor *_GetNewCursor();
00076 };
00077 
00078 #endif //__C_ORACLECONNECTION_H__

Generated on Sun Jul 14 20:51:14 2002 for POLiTe by doxygen1.2.16