BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
ElogContact Class Reference

/home/gertsen/bmnroot/database/elog_db/ElogContact.h Class for the table: contact_ More...

#include <ElogContact.h>

Collaboration diagram for ElogContact:

Public Member Functions

virtual ~ElogContact ()
int GetContactId ()
 get contact id of the current contact
TString * GetContactName ()
 get contact name of the current contact
TString GetContactDesc ()
 get contact desc of the current contact
TString * GetPhones ()
 get phones of the current contact
TString * GetEmail ()
 get email of the current contact
int SetContactName (TString *contact_name)
 set contact name of the current contact
int SetContactDesc (TString contact_desc)
 set contact desc of the current contact
int SetPhones (TString *phones)
 set phones of the current contact
int SetEmail (TString *email)
 set email of the current contact
void Print ()
 print information about current contact

Static Public Member Functions

static ElogContact * CreateContact (TString *contact_name, TString contact_desc, TString *phones, TString *email)
 add new contact to the database
static ElogContact * GetContact (int contact_id)
 get contact from the database
static int CheckContactExists (int contact_id)
 check contact exists in the database: 1- true, 0 - false, <0 - database operation error
static int DeleteContact (int contact_id)
 delete contact from the database
static int PrintAll ()
 print all contacts

Private Member Functions

 ElogContact (ElogConnection *db_connect, int contact_id, TString *contact_name, TString contact_desc, TString *phones, TString *email)

Private Attributes

ElogConnection * connectionDB
 connection to the database
int i_contact_id
 contact id
TString * str_contact_name
 contact name
TString str_contact_desc
 contact desc
TString * str_phones
 phones
TString * str_email
 email

Detailed Description

Definition at line 18 of file ElogContact.h.

Constructor & Destructor Documentation

◆ ElogContact()

ElogContact::ElogContact ( ElogConnection * db_connect,
int contact_id,
TString * contact_name,
TString contact_desc,
TString * phones,
TString * email )
private

Definition at line 16 of file ElogContact.cxx.

References connectionDB, i_contact_id, str_contact_desc, str_contact_name, str_email, and str_phones.

Referenced by CreateContact(), and GetContact().

Here is the caller graph for this function:

◆ ~ElogContact()

ElogContact::~ElogContact ( )
virtual

Definition at line 33 of file ElogContact.cxx.

References connectionDB, str_contact_name, str_email, and str_phones.

Member Function Documentation

◆ CheckContactExists()

int ElogContact::CheckContactExists ( int contact_id)
static

Definition at line 192 of file ElogContact.cxx.

References TString::Format(), ElogConnection::GetSQLServer(), TSQLStatement::NextResultRow(), ElogConnection::Open(), TSQLStatement::Process(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Here is the call graph for this function:

◆ CreateContact()

ElogContact * ElogContact::CreateContact ( TString * contact_name,
TString contact_desc,
TString * phones,
TString * email )
static

Definition at line 46 of file ElogContact.cxx.

References ElogContact(), TString::Format(), TSQLStatement::GetInt(), ElogConnection::GetSQLServer(), TSQLStatement::NextIteration(), TSQLStatement::NextResultRow(), ElogConnection::Open(), TSQLStatement::Process(), TSQLStatement::SetNull(), TSQLStatement::SetString(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Here is the call graph for this function:

◆ DeleteContact()

int ElogContact::DeleteContact ( int contact_id)
static

Definition at line 232 of file ElogContact.cxx.

References TString::Format(), ElogConnection::GetSQLServer(), TSQLStatement::NextIteration(), ElogConnection::Open(), TSQLStatement::Process(), TSQLStatement::SetInt(), and TSQLServer::Statement().

Here is the call graph for this function:

◆ GetContact()

ElogContact * ElogContact::GetContact ( int contact_id)
static

Definition at line 131 of file ElogContact.cxx.

References ElogContact(), TString::Format(), TSQLStatement::GetInt(), ElogConnection::GetSQLServer(), TSQLStatement::GetString(), TSQLStatement::IsNull(), TSQLStatement::NextResultRow(), ElogConnection::Open(), TSQLStatement::Process(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Here is the call graph for this function:

◆ GetContactDesc()

TString ElogContact::GetContactDesc ( )
inline

Definition at line 73 of file ElogContact.h.

References str_contact_desc.

◆ GetContactId()

int ElogContact::GetContactId ( )
inline

Definition at line 63 of file ElogContact.h.

References i_contact_id.

◆ GetContactName()

TString * ElogContact::GetContactName ( )
inline

Definition at line 65 of file ElogContact.h.

References str_contact_name.

◆ GetEmail()

TString * ElogContact::GetEmail ( )
inline

Definition at line 83 of file ElogContact.h.

References str_email.

◆ GetPhones()

TString * ElogContact::GetPhones ( )
inline

Definition at line 75 of file ElogContact.h.

References str_phones.

◆ Print()

void ElogContact::Print ( )

Definition at line 471 of file ElogContact.cxx.

References i_contact_id, str_contact_desc, str_contact_name, str_email, and str_phones.

◆ PrintAll()

int ElogContact::PrintAll ( )
static

Definition at line 262 of file ElogContact.cxx.

References TString::Format(), TSQLStatement::GetInt(), ElogConnection::GetSQLServer(), TSQLStatement::GetString(), TSQLStatement::IsNull(), TSQLStatement::NextResultRow(), ElogConnection::Open(), TSQLStatement::Process(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Here is the call graph for this function:

◆ SetContactDesc()

int ElogContact::SetContactDesc ( TString contact_desc)

Definition at line 358 of file ElogContact.cxx.

References connectionDB, TString::Format(), i_contact_id, TSQLStatement::NextIteration(), TSQLStatement::Process(), TSQLStatement::SetInt(), TSQLStatement::SetString(), TSQLServer::Statement(), and str_contact_desc.

Here is the call graph for this function:

◆ SetContactName()

int ElogContact::SetContactName ( TString * contact_name)

Definition at line 318 of file ElogContact.cxx.

References connectionDB, TString::Format(), i_contact_id, TSQLStatement::NextIteration(), TSQLStatement::Process(), TSQLStatement::SetInt(), TSQLStatement::SetNull(), TSQLStatement::SetString(), TSQLServer::Statement(), and str_contact_name.

Here is the call graph for this function:

◆ SetEmail()

int ElogContact::SetEmail ( TString * email)

Definition at line 430 of file ElogContact.cxx.

References connectionDB, TString::Format(), i_contact_id, TSQLStatement::NextIteration(), TSQLStatement::Process(), TSQLStatement::SetInt(), TSQLStatement::SetNull(), TSQLStatement::SetString(), TSQLServer::Statement(), and str_email.

Here is the call graph for this function:

◆ SetPhones()

int ElogContact::SetPhones ( TString * phones)

Definition at line 390 of file ElogContact.cxx.

References connectionDB, TString::Format(), i_contact_id, TSQLStatement::NextIteration(), TSQLStatement::Process(), TSQLStatement::SetInt(), TSQLStatement::SetNull(), TSQLStatement::SetString(), TSQLServer::Statement(), and str_phones.

Here is the call graph for this function:

Member Data Documentation

◆ connectionDB

ElogConnection* ElogContact::connectionDB
private

◆ i_contact_id

int ElogContact::i_contact_id
private

◆ str_contact_desc

TString ElogContact::str_contact_desc
private

Definition at line 30 of file ElogContact.h.

Referenced by ElogContact(), GetContactDesc(), Print(), and SetContactDesc().

◆ str_contact_name

TString* ElogContact::str_contact_name
private

Definition at line 28 of file ElogContact.h.

Referenced by ElogContact(), ~ElogContact(), GetContactName(), Print(), and SetContactName().

◆ str_email

TString* ElogContact::str_email
private

Definition at line 34 of file ElogContact.h.

Referenced by ElogContact(), ~ElogContact(), GetEmail(), Print(), and SetEmail().

◆ str_phones

TString* ElogContact::str_phones
private

Definition at line 32 of file ElogContact.h.

Referenced by ElogContact(), ~ElogContact(), GetPhones(), Print(), and SetPhones().


The documentation for this class was generated from the following files: