Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JPersons.hh
Go to the documentation of this file.
1#ifndef __JDB_JPERSONS__
2#define __JDB_JPERSONS__
3
4#include <TROOT.h>
5#include <TObject.h>
6
7#include <string>
8
9#include "JDB/JDBString.hh"
10#include "JDB/JSonSupportkit.hh"
11
12/**
13 * \author mdejong
14 */
15namespace JDATABASE {}
16namespace JPP { using namespace JDATABASE; }
17
18namespace JDATABASE {
19
20 struct JPersons :
21 public TObject
22 {
23 static const char* const getName() { return "persons"; } //!< Table name
24
25 std::string OID;
26 std::string LOGIN;
29 std::string LOCATIONID;
32 std::string ACTIVESTATUS;
33 std::string MEMBERSTATUS;
34 std::string AUTHORSTATUS;
35
37 };
38
39 namespace APIV2 {
40
41 struct JPerson :
42 public JSonHelper<JPerson>,
43 public TObject
44 {
45 static const char* const getName() { return "Person"; } //!< Table name
46
48
49 /**
50 * Copy constructor.
51 *
52 * \param person person
53 */
54 JPerson(const JPersons& person) :
55 OID (person.OID),
56 Login (person.LOGIN),
57 Name (person.NAME),
58 Surname (person.SURNAME),
59 Location (person.LOCATIONID)
60 {}
61
62 /**
63 * Type conversion operator.
64 *
65 * \return person
66 */
67 operator JPersons() const
68 {
69 JPersons person;
70
71 person.OID = this->OID;
72 person.LOGIN = this->Login;
73 person.NAME = this->Name;
74 person.SURNAME = this->Surname;
75 person.LOCATIONID = this->Location;
76
77 return person;
78 }
79
80 std::string OID;
81 std::string Login;
82 std::string Name;
83 std::string Surname;
84 std::string Location;
85 std::string Title;
86 std::string GroupCode;
87 std::string Occupation;
88 std::string CreationDate;
89
91 };
92 }
93}
94
95#endif
Auxiliary classes and methods for database I/O.
Definition JAHRS.hh:14
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static const char *const getName()
Table name.
Definition JPersons.hh:45
JPerson(const JPersons &person)
Copy constructor.
Definition JPersons.hh:54
Wrapper class to read string until end-of-line.
Definition JDBString.hh:22
std::string ACTIVESTATUS
Definition JPersons.hh:32
ClassDef(JPersons, 1)
std::string AUTHORSTATUS
Definition JPersons.hh:34
std::string OID
Definition JPersons.hh:25
std::string LOGIN
Definition JPersons.hh:26
static const char *const getName()
Table name.
Definition JPersons.hh:23
std::string MEMBERSTATUS
Definition JPersons.hh:33
JDBString ADDRESS
Definition JPersons.hh:31
JDBString SURNAME
Definition JPersons.hh:28
std::string LOCATIONID
Definition JPersons.hh:29
Auxiliary base class for JSon I/O based on ROOT dictionary.