1 |
afaq |
1.1 |
#ifndef _MANAGER_H_
|
2 |
|
|
#define _MANAGER_H_
|
3 |
|
|
///Class that creates a manager
|
4 |
|
|
///parent class of all managers
|
5 |
|
|
/// creates DBManager
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
#define USERDSN "mydsnvijay"
|
9 |
|
|
//#define USERDSN "thinservertest"
|
10 |
|
|
#define USERNAME "ggraham"
|
11 |
|
|
//#define USERNAME "anzar"
|
12 |
|
|
|
13 |
|
|
#include "DBManagement.hpp"
|
14 |
|
|
#include "TableInterface.hpp"
|
15 |
|
|
#include "ObjectLayerTables.hpp"
|
16 |
|
|
#include "Message.hpp"
|
17 |
|
|
#include "TableInterface.hpp"
|
18 |
|
|
#include "Util.hpp"
|
19 |
|
|
#include <string>
|
20 |
|
|
#include "RowInterface.hpp"
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
typedef vector<RowInterface*> Rows;
|
24 |
|
|
typedef Rows::iterator RowIter;
|
25 |
|
|
|
26 |
|
|
class Manager {
|
27 |
|
|
|
28 |
|
|
public:
|
29 |
|
|
|
30 |
|
|
Manager();
|
31 |
|
|
Manager(std::string, std::string);
|
32 |
|
|
|
33 |
|
|
int doInsert(TableInterface* inTable, Message& msgReturned);
|
34 |
|
|
//int doSelect(TableInterface* inTable, std::string whereClause, Message& msgReturned);
|
35 |
|
|
int makeMessage(TableInterface* inTable, RowIter b, RowIter e, Message& msgReturned);
|
36 |
|
|
int setRowValues(TableInterface* inTable, RowInterface* rowPtr, Message* message, std::string listName, int index);
|
37 |
|
|
string findKeyMakeQuery(Message* msgReceived);
|
38 |
|
|
|
39 |
|
|
std::string getElementValue(std::string name, Message*);
|
40 |
afaq |
1.2 |
virtual ~Manager();
|
41 |
|
|
//virtual ~Manager(){};
|
42 |
|
|
void cleanup();
|
43 |
afaq |
1.1 |
//virtual void read(Message*, Message&);
|
44 |
|
|
//virtual void write(Message*, Message&);
|
45 |
|
|
|
46 |
|
|
protected:
|
47 |
|
|
DBManagement* dbManager;
|
48 |
|
|
Util util;
|
49 |
|
|
Dictionary* schema;
|
50 |
|
|
};
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
class DatasetProvcManagerParent: public Manager {
|
55 |
|
|
public:
|
56 |
|
|
DatasetProvcManagerParent();
|
57 |
|
|
int read(Message*, Message&);
|
58 |
|
|
~DatasetProvcManagerParent();
|
59 |
|
|
|
60 |
|
|
private:
|
61 |
|
|
DatasetprovenenceevparentMultiTable* dspTable;
|
62 |
|
|
};
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
class DatasetProvcManagerChild: public Manager {
|
67 |
|
|
public:
|
68 |
|
|
DatasetProvcManagerChild();
|
69 |
|
|
int read(Message*, Message&);
|
70 |
|
|
~DatasetProvcManagerChild();
|
71 |
|
|
|
72 |
|
|
private:
|
73 |
|
|
DatasetprovenenceevchildMultiTable* dspTable;
|
74 |
|
|
};
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
class ECReadManager : public Manager {
|
78 |
|
|
public:
|
79 |
|
|
ECReadManager();
|
80 |
|
|
int read(Message*, Message&);
|
81 |
|
|
~ECReadManager();
|
82 |
|
|
|
83 |
|
|
private:
|
84 |
|
|
EvcollviewMultiTable* ecTable;
|
85 |
|
|
};
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
class CRABECReadManager : public Manager {
|
89 |
|
|
public:
|
90 |
|
|
CRABECReadManager();
|
91 |
|
|
int read(Message*, Message&);
|
92 |
|
|
~CRABECReadManager();
|
93 |
|
|
|
94 |
|
|
private:
|
95 |
|
|
CrabevcollviewMultiTable* ecTable;
|
96 |
|
|
};
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
class PrimaryDatasetManager : public Manager {
|
100 |
|
|
public:
|
101 |
|
|
PrimaryDatasetManager();
|
102 |
|
|
int write(Message*, Message&);
|
103 |
|
|
int read(Message*, Message&);
|
104 |
|
|
~PrimaryDatasetManager();
|
105 |
|
|
|
106 |
|
|
private:
|
107 |
|
|
PrimarydatasetMultiTable* priDatasetTable;
|
108 |
|
|
};
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
|
|
class ProcessedDatasetManager : public Manager {
|
113 |
|
|
public:
|
114 |
|
|
ProcessedDatasetManager();
|
115 |
|
|
int write(Message*, Message&);
|
116 |
|
|
int read(Message* , Message& );
|
117 |
|
|
~ProcessedDatasetManager();
|
118 |
|
|
|
119 |
|
|
private:
|
120 |
|
|
ProcessingpathMultiTable* processedDatasetTable;
|
121 |
|
|
};
|
122 |
|
|
|
123 |
|
|
/*
|
124 |
|
|
class GenParamManager : public Manager {
|
125 |
|
|
public:
|
126 |
|
|
GenParamManager();
|
127 |
|
|
int write(Message*, Message&);
|
128 |
|
|
~GenParamManager();
|
129 |
|
|
|
130 |
|
|
private:
|
131 |
|
|
GenparametersetsMultiTable* genparametersetsTable;
|
132 |
|
|
};
|
133 |
|
|
*/
|
134 |
|
|
|
135 |
|
|
class AppConfigManager : public Manager {
|
136 |
|
|
public:
|
137 |
|
|
AppConfigManager();
|
138 |
|
|
int write(Message*, Message&);
|
139 |
|
|
~AppConfigManager();
|
140 |
|
|
|
141 |
|
|
private:
|
142 |
|
|
InsertappsMultiTable* appsConfigTable;
|
143 |
|
|
};
|
144 |
|
|
|
145 |
|
|
|
146 |
|
|
class FileManager : public Manager {
|
147 |
|
|
public:
|
148 |
|
|
FileManager();
|
149 |
|
|
int write(Message*, Message&);
|
150 |
|
|
int read(Message*, Message&);
|
151 |
|
|
~FileManager();
|
152 |
|
|
|
153 |
|
|
private:
|
154 |
|
|
FileviewMultiTable* fileTable;
|
155 |
|
|
};
|
156 |
|
|
|
157 |
|
|
|
158 |
|
|
class ECWriteManager : public Manager {
|
159 |
|
|
public:
|
160 |
|
|
ECWriteManager();
|
161 |
|
|
int write(Message*, Message&);
|
162 |
|
|
~ECWriteManager();
|
163 |
|
|
|
164 |
|
|
private:
|
165 |
|
|
EvcollviewMultiTable* ecTable;
|
166 |
|
|
};
|
167 |
|
|
|
168 |
|
|
/*
|
169 |
|
|
class AssignRoleManager : public Manager {
|
170 |
|
|
public:
|
171 |
|
|
AssignRoleManager();
|
172 |
|
|
int write(Message*, Message&);
|
173 |
|
|
~AssignRoleManager();
|
174 |
|
|
|
175 |
|
|
private:
|
176 |
|
|
AdministrativeMultiTable* assignRoleTable;
|
177 |
|
|
};
|
178 |
|
|
|
179 |
|
|
*/
|
180 |
|
|
class PersonManager : public Manager {
|
181 |
|
|
public:
|
182 |
|
|
PersonManager();
|
183 |
|
|
int write(Message*, Message&);
|
184 |
|
|
~PersonManager();
|
185 |
|
|
|
186 |
|
|
private:
|
187 |
|
|
PersonMultiTable* personTable;
|
188 |
|
|
};
|
189 |
|
|
/*
|
190 |
|
|
class RoleManager : public Manager {
|
191 |
|
|
public:
|
192 |
|
|
RoleManager();
|
193 |
|
|
int write(Message*, Message&);
|
194 |
|
|
~RoleManager();
|
195 |
|
|
|
196 |
|
|
private:
|
197 |
|
|
RoleMultiTable* roleTable;
|
198 |
|
|
};
|
199 |
|
|
*/
|
200 |
|
|
|
201 |
|
|
class AnalysisDatasetManager : public Manager {
|
202 |
|
|
public:
|
203 |
|
|
AnalysisDatasetManager();
|
204 |
|
|
int write(Message*, Message&);
|
205 |
|
|
~AnalysisDatasetManager();
|
206 |
|
|
|
207 |
|
|
private:
|
208 |
|
|
AnalysisdatasetMultiTable* analysisDatasetTable;
|
209 |
|
|
};
|
210 |
|
|
|
211 |
|
|
class PhysicsGroupManager : public Manager {
|
212 |
|
|
public:
|
213 |
|
|
PhysicsGroupManager();
|
214 |
|
|
int write(Message*, Message&);
|
215 |
|
|
~PhysicsGroupManager();
|
216 |
|
|
|
217 |
|
|
private:
|
218 |
|
|
PhysicsgroupMultiTable* physicsgroupTable;
|
219 |
|
|
};
|
220 |
|
|
|
221 |
|
|
|
222 |
|
|
#endif
|