#include <Product.h>
Public Member Functions | |
Product () | |
Product (Row &aRow) | |
~Product () | |
Default destructor. | |
auto_ptr< Category > | getCategory () |
float | getPrice () |
string | primaryKey () |
Returns the primary for entity "products" (KEY_PRD_PID). | |
Static Public Member Functions | |
static Product * | factory (string aName, int aCid, float aPrice, string aDescr="empty", int aQty=0, bool isDel=false) |
static Product * | productByID (int aPid) |
static void | showCompatibleProducts (int aPid) |
Friends | |
ostream & | operator<< (ostream &, Product &) |
Product::Product | ( | ) |
Referenced by factory(), and productByID().
Product::Product | ( | Row & | aRow | ) |
Product::~Product | ( | ) |
Default destructor.
Product * Product::factory | ( | string | aName, | |
int | aCid, | |||
float | aPrice, | |||
string | aDescr = "empty" , |
|||
int | aQty = 0 , |
|||
bool | isDel = false | |||
) | [static] |
References KEY_PRD_AVAILABILITY, KEY_PRD_CID, KEY_PRD_DELETED, KEY_PRD_DESCR, KEY_PRD_NAME, KEY_PRD_PID, KEY_PRD_PRICE, Product(), ManagedObject::setBoolForKey(), ManagedObject::setFloatForKey(), ManagedObject::setIntForKey(), and ManagedObject::setValueForKey().
Referenced by UserMenu::addNewProduct().
auto_ptr< Category > Product::getCategory | ( | ) |
References Category::categoryByID(), ManagedObject::intForKey(), and KEY_PRD_CID.
Referenced by ProductProxy::getCategory(), and operator<<().
float Product::getPrice | ( | ) |
References ManagedObject::floatForKey(), and KEY_PRD_PRICE.
Referenced by Basket::addProduct(), and ProductProxy::getPrice().
string Product::primaryKey | ( | ) | [virtual] |
Returns the primary for entity "products" (KEY_PRD_PID).
Implements ManagedObject.
References KEY_PRD_PID.
Referenced by Basket::addProduct(), and Basket::removeProduct().
Product * Product::productByID | ( | int | aPid | ) | [static] |
References Database::getConnection(), Database::Instance(), Product(), and SQL_PRODUCT_PROXY.
Referenced by UserMenu::changeProductDetail().
void Product::showCompatibleProducts | ( | int | aPid | ) | [static] |
References Database::getConnection(), Database::Instance(), and Database::printResult().
Referenced by UserMenu::showConfigurationByProduct().
ostream& operator<< | ( | ostream & | aStream, | |
Product & | p | |||
) | [friend] |