BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
ElogPerson.h
Go to the documentation of this file.
1
// ----------------------------------------------------------------------
2
// ElogPerson header file
3
// Generated 27-11-2017
4
// ----------------------------------------------------------------------
5
6
/** ElogPerson.h
7
** Class for the table: person_
8
**/
9
10
#ifndef ElogPerson_H
11
#define ElogPerson_H 1
12
13
#include "
ElogConnection.h
"
14
#include "
TDatime.h
"
15
#include "
TObjArray.h
"
16
#include "
TString.h
"
17
18
class
ElogPerson
19
{
20
private
:
21
/* GENERATED PRIVATE MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
22
/// connection to the database
23
ElogConnection*
connectionDB
;
24
25
/// person id
26
TString
str_person_id
;
27
/// person name
28
TString
str_person_name
;
29
/// is active
30
bool
b_is_active
;
31
/// email
32
TString*
str_email
;
33
34
// Constructor
35
ElogPerson
(
ElogConnection
* db_connect,
TString
person_id,
TString
person_name,
bool
is_active,
TString
* email);
36
/* END OF PRIVATE GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
37
38
public
:
39
/* GENERATED PUBLIC MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
40
virtual
~ElogPerson
();
// Destructor
41
42
// static class functions
43
/// add new person to the database
44
static
ElogPerson
*
CreatePerson
(
TString
person_name,
bool
is_active,
TString
* email);
45
/// get person from the database
46
static
ElogPerson
*
GetPerson
(
TString
person_id);
47
/// check person exists in the database: 1 - true, 0 - false, <0 - database operation error
48
static
int
CheckPersonExists
(
TString
person_id);
49
/// delete person from the database
50
static
int
DeletePerson
(
TString
person_id);
51
/// print all persons
52
static
int
PrintAll
();
53
54
// Getters
55
/// get person id of the current person
56
TString
GetPersonId
() {
return
str_person_id
; }
57
/// get person name of the current person
58
TString
GetPersonName
() {
return
str_person_name
; }
59
/// get is active of the current person
60
bool
GetIsActive
() {
return
b_is_active
; }
61
/// get email of the current person
62
TString
*
GetEmail
()
63
{
64
if
(
str_email
==
nullptr
)
65
return
nullptr
;
66
else
67
return
new
TString
(*
str_email
);
68
}
69
70
// Setters
71
/// set person name of the current person
72
int
SetPersonName
(
TString
person_name);
73
/// set is active of the current person
74
int
SetIsActive
(
bool
is_active);
75
/// set email of the current person
76
int
SetEmail
(
TString
* email);
77
78
/// print information about current person
79
void
Print
();
80
/* END OF PUBLIC GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
81
82
/// get persons from the database by name or its part
83
static
TObjArray
*
GetPersonByName
(
TString
person_name_part);
84
/// check persons exists in the database by name or its part:
85
/// >=1 - person count, 0 - false, <0 - database operation error
86
static
int
CheckPersonExistsByName
(
TString
person_name_part);
87
/// delete persons from the database by name or its part
88
/// >=1 - affected count, 0 - persons not found, <0 - database operation error
89
static
int
DeletePersonByName
(
TString
person_name_part);
90
91
ClassDef
(
ElogPerson
, 1);
92
};
93
94
#endif
ClassDef
#define ClassDef(name, id)
TDatime.h
TObjArray.h
TString.h
ElogConnection
Definition
ElogConnection.h:27
ElogPerson
ElogPerson.h Class for the table: person_.
Definition
ElogPerson.h:19
ElogPerson::GetPersonName
TString GetPersonName()
get person name of the current person
Definition
ElogPerson.h:58
ElogPerson::b_is_active
bool b_is_active
is active
Definition
ElogPerson.h:30
ElogPerson::SetIsActive
int SetIsActive(bool is_active)
set is active of the current person
ElogPerson::GetEmail
TString * GetEmail()
get email of the current person
Definition
ElogPerson.h:62
ElogPerson::~ElogPerson
virtual ~ElogPerson()
ElogPerson::PrintAll
static int PrintAll()
print all persons
ElogPerson::CheckPersonExistsByName
static int CheckPersonExistsByName(TString person_name_part)
check persons exists in the database by name or its part: >=1 - person count, 0 - false,...
ElogPerson::GetIsActive
bool GetIsActive()
get is active of the current person
Definition
ElogPerson.h:60
ElogPerson::DeletePerson
static int DeletePerson(TString person_id)
delete person from the database
ElogPerson::GetPerson
static ElogPerson * GetPerson(TString person_id)
get person from the database
ElogPerson::str_email
TString * str_email
email
Definition
ElogPerson.h:32
ElogPerson::Print
void Print()
print information about current person
ElogPerson::GetPersonId
TString GetPersonId()
get person id of the current person
Definition
ElogPerson.h:56
ElogPerson::SetEmail
int SetEmail(TString *email)
set email of the current person
ElogPerson::CheckPersonExists
static int CheckPersonExists(TString person_id)
check person exists in the database: 1 - true, 0 - false, <0 - database operation error
ElogPerson::connectionDB
ElogConnection * connectionDB
connection to the database
Definition
ElogPerson.h:23
ElogPerson::SetPersonName
int SetPersonName(TString person_name)
set person name of the current person
ElogPerson::str_person_name
TString str_person_name
person name
Definition
ElogPerson.h:28
ElogPerson::DeletePersonByName
static int DeletePersonByName(TString person_name_part)
delete persons from the database by name or its part >=1 - affected count, 0 - persons not found,...
ElogPerson::ElogPerson
ElogPerson(ElogConnection *db_connect, TString person_id, TString person_name, bool is_active, TString *email)
ElogPerson::str_person_id
TString str_person_id
person id
Definition
ElogPerson.h:26
ElogPerson::CreatePerson
static ElogPerson * CreatePerson(TString person_name, bool is_active, TString *email)
add new person to the database
ElogPerson::GetPersonByName
static TObjArray * GetPersonByName(TString person_name_part)
get persons from the database by name or its part
TObjArray
TString
ElogConnection.h
install
include
ElogPerson.h
Generated on
for BmnRoot by
1.17.0