/[H6]/DatabaseLayer.h
ViewVC logotype

Contents of /DatabaseLayer.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 60 - (show annotations) (download)
Mon Oct 22 13:00:14 2007 UTC (16 years, 4 months ago) by torben
File MIME type: text/plain
File size: 1431 byte(s)
Refactored the database layer classes. Pushed most of the functions to the parent class.
1 /*
2 * Primary developers: Hedin & Kevin
3 */
4
5 #pragma once
6
7 #include "Containers.h"
8 #include <vector>
9
10 using namespace std;
11
12 class DatabaseLayer
13 {
14 public:
15 virtual ~DatabaseLayer(void) {};
16
17 virtual vector<Person> GetPersonAll(void);
18 virtual Person GetPerson(CString wantInits);
19
20 virtual bool AddPerson(Person NewPerson);
21 virtual bool UpdatePerson(Person ChangePerson);
22 virtual bool DeletePerson(Person RemovePerson);
23 virtual bool ReturnEquipment(CString barcode);
24 virtual bool CheckoutEquipment(Person CheckPersID, Equipment CheckEquip, int Numdays) ;
25 virtual bool EquipmentReservation(CString barcode, Person CheckPerson) ;
26 virtual bool UpdateEquipment(Equipment CheckEquip);
27 virtual bool AddEquipment(Equipment AddEquip);
28 virtual vector<Equipment> GetEquipmentAll(void);
29 virtual Equipment GetEquipment(CString wantBarcode);
30 virtual bool DeleteEquipment(Equipment DelEquip);
31 virtual vector<Equipment> Search(CString barcode, CString name, CString inits, bool available, bool reserved, bool deposited) = 0;
32
33
34 virtual void checkReservations(CString barcode);
35 virtual bool DeleteReservation(CString barcode, CString resid);
36
37 protected:
38 DatabaseLayer(void) {} //Avoid direct instantiation
39
40 virtual void FillEquipmentVector(vector<Equipment> &buffer, CRecordset &rs);
41
42 virtual CString GenerateQueryForLatestCheckouts(CString barcode) = 0;
43
44 protected:
45 CDatabase db;
46
47 };

  ViewVC Help
Powered by ViewVC 1.1.20