artefaktur
software engineer &        architecture

 
 
 
 

class DBConnect

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::tools::odbctests::DBConnect Class Reference

#include <dbconnect.h>

Inheritance diagram for acdk::tools::odbctests::DBConnect:

acdk::lang::Object acdk::lang::Runnable acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

Class DBConnect: Establish a connection to a Database via ODBC.


Public Member Functions

 DBConnect ()
 ~DBConnect ()
void init (RString testtable, int numberOfTestRecords, RConnection connection=Nil,::acdk::io::RPrintWriter out=System::out)
RString getURL ()
bool getStatus ()
RString getTestTable ()
void setTestTable (RString table)
int getNumberOfTestRecords ()
void setNumberOfTestRecords (int newVal)
jlong getStartTime ()
bool getTestSuccessful ()
bool connect (RString url)
void execute (RString sql)
 Send SQL string to Database.

void executeUpdate (RString sql)
 Send SQL string to Database for INSERT, UPDATE, DELETE.

RResultSet executeQuery (RString sql)
 Send SQL string to Database.

virtual void run ()
void println (RString message)
void print (RString message)

Static Public Member Functions

void loadDriver (RString driverClassName)

Private Member Functions

void setStatus (bool stat)
 Status can only be set by member-functions.

void setURL (RString url)
 URL will only be set by connect.

void setStartTime (jlong starttime)
void setTestSuccessful (bool stat)

Private Attributes

RString _url
 ODBC connection url.

bool _status
 set if a connection is established at present

RDriver _driver
 The Driver.

RConnection _connection
 The Connection.

::acdk::util::RProperties _connectionProperties
 The Properties acdk::lang::Object.

::acdk::io::RPrintWriter _out
 Textoutput will be passed to this PrintWriter.

RString _testTable
 Tablename for Testing.

int _numberOfTestRecords
 The total Number of records to be inserted by the test.

jlong _starttime
 Start-Timestamp of Test.

int _sizeOfTimeStamp
 Lenght of Timestamp in output.

bool _testSuccessful
 indicates success of Test


Constructor & Destructor Documentation

acdk::tools::odbctests::DBConnect::DBConnect  ) 
 

acdk::tools::odbctests::DBConnect::~DBConnect  ) 
 


Member Function Documentation

bool acdk::tools::odbctests::DBConnect::connect RString  url  ) 
 

void acdk::tools::odbctests::DBConnect::execute RString  sql  ) 
 

Send SQL string to Database.

RResultSet acdk::tools::odbctests::DBConnect::executeQuery RString  sql  ) 
 

Send SQL string to Database.

ResultSet is returned

void acdk::tools::odbctests::DBConnect::executeUpdate RString  sql  ) 
 

Send SQL string to Database for INSERT, UPDATE, DELETE.

int acdk::tools::odbctests::DBConnect::getNumberOfTestRecords  )  [inline]
 

jlong acdk::tools::odbctests::DBConnect::getStartTime  )  [inline]
 

bool acdk::tools::odbctests::DBConnect::getStatus  )  [inline]
 

bool acdk::tools::odbctests::DBConnect::getTestSuccessful  )  [inline]
 

RString acdk::tools::odbctests::DBConnect::getTestTable  )  [inline]
 

RString acdk::tools::odbctests::DBConnect::getURL  )  [inline]
 

void acdk::tools::odbctests::DBConnect::init RString  testtable,
int  numberOfTestRecords,
RConnection  connection = Nil,
::acdk::io::RPrintWriter  out = System::out
 

void acdk::tools::odbctests::DBConnect::loadDriver RString  driverClassName  )  [static]
 

void acdk::tools::odbctests::DBConnect::print RString  message  ) 
 

void acdk::tools::odbctests::DBConnect::println RString  message  ) 
 

virtual void acdk::tools::odbctests::DBConnect::run  )  [virtual]
 

Implements acdk::lang::Runnable.

void acdk::tools::odbctests::DBConnect::setNumberOfTestRecords int  newVal  )  [inline]
 

void acdk::tools::odbctests::DBConnect::setStartTime jlong  starttime  )  [inline, private]
 

void acdk::tools::odbctests::DBConnect::setStatus bool  stat  )  [inline, private]
 

Status can only be set by member-functions.

void acdk::tools::odbctests::DBConnect::setTestSuccessful bool  stat  )  [inline, private]
 

void acdk::tools::odbctests::DBConnect::setTestTable RString  table  )  [inline]
 

void acdk::tools::odbctests::DBConnect::setURL RString  url  )  [inline, private]
 

URL will only be set by connect.


Member Data Documentation

RConnection acdk::tools::odbctests::DBConnect::_connection [private]
 

The Connection.

::acdk::util::RProperties acdk::tools::odbctests::DBConnect::_connectionProperties [private]
 

The Properties acdk::lang::Object.

RDriver acdk::tools::odbctests::DBConnect::_driver [private]
 

The Driver.

int acdk::tools::odbctests::DBConnect::_numberOfTestRecords [private]
 

The total Number of records to be inserted by the test.

::acdk::io::RPrintWriter acdk::tools::odbctests::DBConnect::_out [private]
 

Textoutput will be passed to this PrintWriter.

int acdk::tools::odbctests::DBConnect::_sizeOfTimeStamp [private]
 

Lenght of Timestamp in output.

Timestamp precision is milliseconds

jlong acdk::tools::odbctests::DBConnect::_starttime [private]
 

Start-Timestamp of Test.

bool acdk::tools::odbctests::DBConnect::_status [private]
 

set if a connection is established at present

bool acdk::tools::odbctests::DBConnect::_testSuccessful [private]
 

indicates success of Test

RString acdk::tools::odbctests::DBConnect::_testTable [private]
 

Tablename for Testing.

RString acdk::tools::odbctests::DBConnect::_url [private]
 

ODBC connection url.

 
Last modified 2005-05-08 18:33 by SYSTEM By Artefaktur, Ing. Bureau Kommer