TraDemGen Logo  1.00.0
C++ Simulated Travel Demand Generation Library
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
TRADEMGEN::DBManager Class Reference

#include <trademgen/command/DBManager.hpp>

List of all members.

Static Public Member Functions

static void updateAirlineInDB (stdair::DBSession_T &, const stdair::AirlineStruct &)
static bool retrieveAirline (stdair::DBSession_T &, const stdair::AirlineCode_T &, stdair::AirlineStruct &)
static void prepareSelectStatement (stdair::DBSession_T &, stdair::DBRequestStatement_T &, stdair::AirlineStruct &)
static bool iterateOnStatement (stdair::DBRequestStatement_T &, stdair::AirlineStruct &, const bool iShouldDoReset)

Detailed Description

Class building the Business Object Model (BOM) from data retrieved from the database.

Definition at line 20 of file DBManager.hpp.

Member Function Documentation

void TRADEMGEN::DBManager::updateAirlineInDB ( stdair::DBSession_T &  ioSociSession,
const stdair::AirlineStruct &  iAirline 

Update the fields of the database row corresponding to the given BOM object.

Definition at line 121 of file DBManager.cpp.

bool TRADEMGEN::DBManager::retrieveAirline ( stdair::DBSession_T &  ioSociSession,
const stdair::AirlineCode_T &  iAirlineCode,
stdair::AirlineStruct &  ioAirline 

Retrieve, from the (MySQL) database, the row corresponding to the given BOM code, and fill the given BOM object with that retrieved data.

Definition at line 157 of file DBManager.cpp.

References iterateOnStatement().

void TRADEMGEN::DBManager::prepareSelectStatement ( stdair::DBSession_T &  ioSociSession,
stdair::DBRequestStatement_T &  ioSelectStatement,
stdair::AirlineStruct &  ioAirline 

Prepare (parse and put in cache) the SQL statement.

Definition at line 24 of file DBManager.cpp.

bool TRADEMGEN::DBManager::iterateOnStatement ( stdair::DBRequestStatement_T &  ioStatement,
stdair::AirlineStruct &  ioAirline,
const bool  iShouldDoReset 

Iterate on the SQL statement.
The SQL has to be already prepared. const bool Tells whether the Airline object should be reset.

Definition at line 97 of file DBManager.cpp.

Referenced by retrieveAirline().

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