FactDev  0.1
ratedatabase.h
1 #ifndef RATEDATABASE_H
2 #define RATEDATABASE_H
3 #include "exceptions/dbexception.h"
4 #include "database.h"
5 
6 #include "models/rate.h"
7 using namespace Exceptions;
8 
9 namespace Databases {
10 
11 class RateDatabase : public Database
12 {
13 public:
18  static RateDatabase* instance() throw (DbException*);
19 
28  void addRateProject(int idProject, int idBilling, double hourlyRate);
29 
37  double getRate(const int idBilling, const int idProject) const;
38 
47  void updateRateProject(int idProject, int idBilling, double hourlyRate);
48 
49 private:
50  static RateDatabase* _instance;
51 
54  RateDatabase() throw (DbException*);
55 
56 };
57 
58 }
59 #endif // RATEDATABASE_H
The DbException class for database exception : queries, db file, …
Definition: dbexception.h:18
The Database class Master class for all database access.
Definition: database.h:34
Definition: ratedatabase.h:11