FactDev  0.1
Databases::RateDatabase Class Reference
Inheritance diagram for Databases::RateDatabase:
Databases::Database

Public Member Functions

void addRateProject (int idProject, int idBilling, double hourlyRate)
 RateDatabase::addRateProject Add a new rate hourlyRate to the Project identified by idProject of the Billing with idBilling as identify. More...
 
double getRate (const int idBilling, const int idProject) const
 RateDatabase::getRate Return the rate of the Project identified by idProject of the Billing with idBilling as identify. More...
 
void updateRateProject (int idProject, int idBilling, double hourlyRate)
 RateDatabase::updateRateProject Update the current rate by the new hourlyRate of the Project identified by idProject of the Billing with idBilling as identify. More...
 
- Public Member Functions inherited from Databases::Database
QString lastError (const QSqlQuery &q) const
 Database::lastError Return an error message on the last error occured during the SQL request q More...
 
void testCases ()
 Database::testCases Realise a test cases.
 
void executeFile (QString pName)
 Database::executerFichier Exeute a specified file named pName More...
 
void openTransaction ()
 Database::openTransaction Open new transaction.
 
void closeTransaction ()
 Database::closeTransaction Close current transaction.
 
void close ()
 Database::close Close database access.
 
void open ()
 Database::open Open database.
 
 ~Database ()
 Database::~Database Suppression object, and close database access.
 
void setDatabase (QSqlDatabase sql)
 Database::setDatabase Set database. More...
 
void updateBillingNumber ()
 Database::updateBillingNumber Update the billing number.
 
void cleanDatabase ()
 Database::clearDatabase Drop alls tables of Database WARNING: We can't restore data after.
 
void changeDatabase (Databases::DbType dbType)
 changeDatabase Change the current database : mysql to sqlite or sqlite to mysql More...
 

Static Public Member Functions

static RateDatabaseinstance () throw (DbException*)
 RateDatabase::getInstance Return an instance of RateDatabase. More...
 
- Static Public Member Functions inherited from Databases::Database
static Databaseinstance (bool tests=false) throw (DbException*)
 Database::getInstance Return an instance of Database. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Databases::Database
 Database (bool tests=false) throw (DbException*)
 Database::Database Database is a singleton.
 
QVariant value (const QSqlQuery &q, const QString &champ) const
 Database::valeur Value of database field. More...
 
- Protected Attributes inherited from Databases::Database
QSettings * _settings
 settings
 
QSqlDatabase mDatabase
 contains Database
 
QList< Database * > _instances
 List of instances.
 
- Static Protected Attributes inherited from Databases::Database
static Database_instance = 0
 Instance.
 
static bool _dbInstance = 0
 an instance of db is open
 
static bool isOpen = false
 Database is open.
 
static bool _isMysql = false
 

Member Function Documentation

void Databases::RateDatabase::addRateProject ( int  idProject,
int  idBilling,
double  hourlyRate 
)

RateDatabase::addRateProject Add a new rate hourlyRate to the Project identified by idProject of the Billing with idBilling as identify.

Parameters
idProjectProject identify
idBillingBilling identify
hourlyRateNew hourly rate
double Databases::RateDatabase::getRate ( const int  idBilling,
const int  idProject 
) const

RateDatabase::getRate Return the rate of the Project identified by idProject of the Billing with idBilling as identify.

Parameters
idBillingBilling identify
idProjectProject identify
Returns
Rate of the Project of a Billing
RateDatabase * Databases::RateDatabase::instance ( )
throw (DbException *
)
static

RateDatabase::getInstance Return an instance of RateDatabase.

Returns
Instance of RateDatabase
void Databases::RateDatabase::updateRateProject ( int  idProject,
int  idBilling,
double  hourlyRate 
)

RateDatabase::updateRateProject Update the current rate by the new hourlyRate of the Project identified by idProject of the Billing with idBilling as identify.

Parameters
idProjectProject identify
idBillingBilling identify
hourlyRateNew hourly rate

The documentation for this class was generated from the following files: