AdminUser Class Reference

#include <User.h>

Inheritance diagram for AdminUser:
Inheritance graph
[legend]
Collaboration diagram for AdminUser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AdminUser (Row &aRow)
 Constructs an instance of AdminUser and fill it with data taken from mysqlpp::Row.
BasketgetBasket ()
OrderplaceOrder () throw (string)
vector< User * > & userList ()
 Returns the list of currently registered users, even if locked.
bool changeUserPassword (User &anUser, string aPasswd)
 Let an administrator to change a user password: this method could also be used to disable a user login.
void showMonthlyTrend ()
 Displays the monthly trend of sales, grouped by year/month.

Constructor & Destructor Documentation

AdminUser::AdminUser ( Row &  aRow  ) 

Constructs an instance of AdminUser and fill it with data taken from mysqlpp::Row.

Parameters:
aRow Record fetched from the database
See also:
ManagedObject, User::User

Referenced by userList().


Member Function Documentation

bool AdminUser::changeUserPassword ( User anUser,
string  aPasswd 
)

Let an administrator to change a user password: this method could also be used to disable a user login.

To make this change persistent, remember to commit by calling store().

Parameters:
[in] anUser Instance of user to alter
[in] aPasswd New password to assign
Returns:
True if change was successful
See also:
ManagedObject::store()

References KEY_USR_PASSWD, ManagedObject::setValueForKey(), and ManagedObject::update().

Referenced by UserMenu::disableUser().

Basket* AdminUser::getBasket (  )  [inline, virtual]

Implements User.

Order* AdminUser::placeOrder (  )  throw (string) [inline, virtual]

Implements User.

void AdminUser::showMonthlyTrend (  ) 

Displays the monthly trend of sales, grouped by year/month.

References Database::getConnection(), Database::Instance(), Database::printResult(), and QUERY_ADMIN_TREND.

Referenced by UserMenu::displayMonthlyTrend().

vector< User * > & AdminUser::userList (  ) 

Returns the list of currently registered users, even if locked.

Returns:
Vector of pointer to class User
See also:
AdminUser, NormalUser, std::vector

References AdminUser(), Database::getConnection(), Database::Instance(), KEY_USR_ADMIN, and QUERY_ADMIN_USERLST.

Referenced by UserMenu::disableUser().


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

Generated by  doxygen 1.6.2