StatusRequestGw provides read access to the status requests of Associate, Contract, PersProduct and PersProductNode. Each of the 4 fetch member functions read the status requests for an object of one the classes above during a time period and adds the status requests to the list passed as parameter. The function does not modify any existing changes in this list.
The upper boundary of the time period is not included, i.e. if a status requests was applied exactly at the upper boundary this status request is not read from the database.
Definition at line 85 of file statusrequest-gw.h.
long OSB_DB::StatusRequestGw::fetch | ( | const Session & | session, | |
OSB_LIB::StatusRequests * | requests, | |||
const OSB_LIB::Id2< OSB_LIB::PersProductNode > & | id | |||
) |
Read all status requests of a pers. product node.
session | Database session to use. | |
requests | List to populate. | |
id | Pers. product node to read for. |
long OSB_DB::StatusRequestGw::fetch | ( | const Session & | session, | |
OSB_LIB::StatusRequests * | requests, | |||
const OSB_LIB::Id< OSB_LIB::PersProduct > & | id | |||
) |
Read all status requests of a pers. product.
session | Database session to use. | |
requests | List to populate. | |
id | Pers. product to read for. |
long OSB_DB::StatusRequestGw::fetch | ( | const Session & | session, | |
OSB_LIB::StatusRequests * | requests, | |||
const OSB_LIB::Id< OSB_LIB::Contract > & | id | |||
) |
Read all status requests of a contract.
session | Database session to use. | |
requests | List to populate. | |
id | Contract to read for. |
long OSB_DB::StatusRequestGw::fetch | ( | const Session & | session, | |
OSB_LIB::StatusRequests * | requests, | |||
const OSB_LIB::Id< OSB_LIB::Associate > & | id | |||
) |
Read all status requests of an associate.
session | Database session to use. | |
requests | List to populate. | |
id | Associate to read for. |
bool OSB_DB::StatusRequestGw::fetch | ( | const Session & | session, | |
OSB_LIB::StatusRequest * | request | |||
) |
Read a status request.
session | Database session to use. | |
request | Request to read. |
bool OSB_DB::StatusRequestGw::fetchNext | ( | const Session & | session, | |
const SrqId & | maxPrev, | |||
OSB_LIB::StatusRequests * | dest | |||
) |
Get the next status request to process.
session | Database session to use. | |
maxPrev | Request id to use as selection criteria, see below. | |
dest | Status request list to populate. It defines the period for which to fetch, see below. |
The 2nd condition is needed to find back-dated status requests that have been entered since the last call to the function.
void OSB_DB::StatusRequestGw::getEntities | ( | const Session & | session, | |
const OSB_LIB::StatusRequest & | request, | |||
OSB_LIB::RequestLinks & | dest | |||
) |
Get the ids of the entities linked to a status request.
session | Database session to use. | |
request | Status request to search for. | |
dest | Request link list to populate. |
bool OSB_DB::StatusRequestGw::incObjVs | ( | const Session & | session, | |
OSB_LIB::StatusRequest & | request | |||
) | [private] |
Increment the object version of a status request.
session | Database session to use. | |
request | The status request who's object version is increased. |
void OSB_DB::StatusRequestGw::insert | ( | const Session & | session, | |
OSB_LIB::StatusRequest & | request | |||
) |
Create a status request.
session | Database session to use. | |
request | Status request to create. |
OSB_LIB::ObjectStatus OSB_DB::StatusRequestGw::lock | ( | const Session & | session, | |
const OSB_LIB::StatusRequest & | request, | |||
bool | noWait | |||
) | [private] |
Lock a status request in the database.
session | Database session to use. | |
request | The status request to lock. | |
noWait | Don't wait if locked by another session? |
OSB_LIB::ObjectStatus OSB_DB::StatusRequestGw::lock | ( | const Session & | session, | |
const OSB_LIB::Id< OSB_LIB::StatusRequest > & | srId, | |||
bool | noWait | |||
) | [private] |
Lock a status request in database.
session | Database session to use. | |
srId | Id of the status request to lock. | |
noWait | Don't wait if locked by another session? |
bool OSB_DB::StatusRequestGw::remove | ( | const OSB_DB::Session & | session, | |
const OSB_LIB::StatusRequest & | request | |||
) | [private] |
Remove the status request from the database.
session | Database session to use. | |
request | Status request to delete. |
bool OSB_DB::StatusRequestGw::updApplied | ( | const Session & | session, | |
const OSB_LIB::StatusRequest & | request | |||
) | [private] |
Mark a status request as applied.
session | Database session to use. | |
request | Status request to process, its applied date and error code must be populated (though they may not be set). |
friend class OSB_LIB::StatusRequest [friend] |