FactDev  0.1
Models::IModel Class Referenceabstract

The IModel class. More...

#include <imodel.h>

Inheritance diagram for Models::IModel:
Models::Billing Models::Contributory Models::People Models::Project Models::Customer Models::User

Public Member Functions

virtual ~IModel ()
 ~IModel Remove an instance of IModel
 
virtual void commit ()=0
 IModel::commit Update or insert data into the database.
 
virtual void hydrat (int id)=0
 IModel::hydrat Get data of the element which is specified by the identify id from the database. More...
 
virtual void remove ()=0
 IModel::remove Remove the current element in the database.
 
virtual QVariantHash getDataMap ()=0
 getDataMap Get all data of model with a HashMap key/value More...
 
int getId () const
 IModel::getId Return the identify of the element of the database. More...
 
void setId (int id)
 IModel::setId Replace the current identify by id More...
 
bool isToRemoved () const
 toRemoved return if object must be removed. More...
 
void setToRemoved (bool toRemoved)
 setToRemoved Change the flag for removed object More...
 

Protected Attributes

int _id
 Element identify.
 
bool _toRemoved
 Flag to know if the object must be removed.
 

Detailed Description

The IModel class.

Author
Antoine de Roquemaurel

Member Function Documentation

virtual QVariantHash Models::IModel::getDataMap ( )
pure virtual

getDataMap Get all data of model with a HashMap key/value

Returns
Model's data

Implemented in Models::Contributory, Models::Billing, Models::Project, Models::User, and Models::Customer.

int Models::IModel::getId ( ) const
inline

IModel::getId Return the identify of the element of the database.

Returns
identity
virtual void Models::IModel::hydrat ( int  id)
pure virtual

IModel::hydrat Get data of the element which is specified by the identify id from the database.

Parameters
id

Implemented in Models::Billing, Models::Project, Models::Contributory, Models::User, and Models::Customer.

bool Models::IModel::isToRemoved ( ) const
inline

toRemoved return if object must be removed.

Returns
boolean
void Models::IModel::setId ( int  id)
inline

IModel::setId Replace the current identify by id

Parameters
idNew identify
void Models::IModel::setToRemoved ( bool  toRemoved)
inline

setToRemoved Change the flag for removed object

Parameters
toRemovedThe new flag

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