Definition at line 58 of file cgi-gw.h.
bool OSB_DB::CgiGw::bothDateInFuture | ( | const Session & | session, | |
const OSB_LIB::Cgi::Oid & | oid | |||
) | [private] |
Ensure both start and end dates are in future.
This function checks whether both released start date and released end date of a CGI are in the future. For end date, it can be null.
session | Database session. | |
oid | Object id of the CGI to be checked. |
OsbException | for all database errors. |
OSB_LIB::ObjectStatus OSB_DB::CgiGw::checkObjVs | ( | const Session & | session, | |
const OSB_LIB::Cgi & | cgi | |||
) | [private] |
Check the current object version.
session | Database session. | |
cgi | CGI object that the object version is to be checked. |
OsbException | for any database errors. |
bool OSB_DB::CgiGw::delCgi | ( | const Session & | session, | |
OSB_LIB::Cgi & | cgi | |||
) | [private] |
Delete a CGI.
This function will delete a CGI entry from the database base on the passed in CGI object. This function will find the database entry with the same object id and object version when performing the deletion. After a successful deletion in the database, this function will unset the object id of the passed in CGI object.
session | Database session. | |
cgi | CGI object to be deleted. |
OsbException | for the following errors:
|
bool OSB_DB::CgiGw::fetch | ( | const Session & | session, | |
OSB_LIB::Cgi & | cgi | |||
) |
Populate a CGI object with data.
This function accept an empty CGI with only its object id set. It will populate all other attribute of the object.
session | Database session. | |
cgi | CGI object to be populated. |
OsbException | for any database errors. |
long OSB_DB::CgiGw::fetch | ( | const Session & | session, | |
OSB_LIB::Cgis & | cgis | |||
) |
Get a list of all available CGIs.
This function retrieve all available CGIs from database.
session | Database session. | |
cgis | Container to store all the CGIs retrieved. |
OsbException | for any database errors. |
OSB_LIB::CfgStatus OSB_DB::CgiGw::getStatus | ( | const Session & | session, | |
const OSB_LIB::Cgi::Oid & | oid | |||
) | [private] |
Get the status of a CGI in database.
session | Database session. | |
oid | Object id of the CGI to be checked. |
OsbException | for the following errors:
|
bool OSB_DB::CgiGw::gracePeriodExpired | ( | const Session & | session, | |
const OSB_LIB::Cgi::Oid & | oid | |||
) | [private] |
Ensure the grace period for a CGI has expired.
This function will ensure the grace period for a CGI has expired.
session | Database session. | |
oid | Object id of the CGI to be checked. |
OsbException | for any database errors. |
bool OSB_DB::CgiGw::hasOverlapCgi | ( | const Session & | session, | |
const OSB_LIB::Cgi::Oid & | oid | |||
) | [private] |
Ensure no two CGIs that is released at the same time.
This function checks all release CGIs to ensure that no two CGI (with same value) is in status released at any time.o
session | Database session. | |
oid | Object id of the CGI to be checked. |
OsbException | for any database errors. |
bool OSB_DB::CgiGw::hasReleasedCp | ( | const Session & | session, | |
const OSB_LIB::Cgi::Oid & | oid | |||
) | [private] |
Ensure there is a released connection point assigned.
This function check whether the CGI has a released connection point assigned. The connection point must have been released when releasing a CGI. This function will also ensures that the release period of a CGI is within the release period of the connection point configured.
session | Database session. | |
oid | Object id of the CGI to be checked. |
OsbException | for any database errors. |
bool OSB_DB::CgiGw::insCgi | ( | const Session & | session, | |
OSB_LIB::Cgi & | cgi | |||
) | [private] |
Add a new CGI.
Before the function call, the CGI object must have all its mandatory attributes assigned (exception oid and object version). After the function call, the object will get its object id and object version.
session | Database session. | |
cgi | New CGI object to be added. |
OsbException | for the following errors:
|
bool OSB_DB::CgiGw::noDateConflict | ( | const Session & | session, | |
const OSB_LIB::Cgi::Oid & | oid | |||
) | [private] |
Ensure no conflict for the start and end date.
This function will ensure that end date (if set), is later than the start date.
session | Database session. | |
oid | Object id of the CGI to be checked. |
OsbException | for any database errors. |
void OSB_DB::CgiGw::setStatus | ( | const Session & | session, | |
const OSB_LIB::Cgi::Oid & | oid, | |||
const OSB_LIB::CfgStatus & | status | |||
) | [private] |
Change the status of a CGI.
This function changes the status of a CGI with the given object id to the status given in the argument.
session | Database session. | |
oid | Tariff period version object id. | |
status | Status to change to. Possible values are:
|
OsbException | for any database errors. |
bool OSB_DB::CgiGw::updCgi | ( | const Session & | session, | |
OSB_LIB::Cgi & | cgi | |||
) | [private] |
Update a CGI.
The function will modify a database entry base on the passed in CGI object. It will find the database entry that shares the same object id and object version with the pass in CGI, than update the found entry with the data contained in the passed in CGI object.
session | Database session. | |
cgi | Updated CGI that will be used to update the database entry. |
OsbException | for the following errors:
|
friend class OSB_LIB::Cgi [friend] |