OSB_DB::StatusRequestGw Class Reference

List of all members.

Detailed Description

Database gateway to STATUS_REQUEST and related tables/views.

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.

Public Types

Public Member Functions

Read status requests:
Support for status request handler.

Private Member Functions

Locking and object version maintenance:

Friends


Member Typedef Documentation

typedef OSB_LIB::Id<OSB_LIB::StatusRequest> OSB_DB::StatusRequestGw::SrqId

Just a short-hand.

Definition at line 91 of file statusrequest-gw.h.


Member Function Documentation

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.

Parameters:
session Database session to use.
requests List to populate.
id Pers. product node to read for.
Returns:
The number of status requests read.

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.

Parameters:
session Database session to use.
requests List to populate.
id Pers. product to read for.
Returns:
The number of status requests read.

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.

Parameters:
session Database session to use.
requests List to populate.
id Contract to read for.
Returns:
The number of status requests read.

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.

Parameters:
session Database session to use.
requests List to populate.
id Associate to read for.
Returns:
The number of status requests read.

bool OSB_DB::StatusRequestGw::fetch ( const Session session,
OSB_LIB::StatusRequest request 
)

Read a status request.

Parameters:
session Database session to use.
request Request to read.
Returns:
true if the request was found, else false.

bool OSB_DB::StatusRequestGw::fetchNext ( const Session session,
const SrqId maxPrev,
OSB_LIB::StatusRequests dest 
)

Get the next status request to process.

Parameters:
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.
Returns:
true if any status request were found, else false.
Selects all status requests with valid-from date less than defined by the time period of dest, where either:

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.

Parameters:
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.

Parameters:
session Database session to use.
request The status request who's object version is increased.
Returns:
true if the object version of request was increased by 1, else false.

void OSB_DB::StatusRequestGw::insert ( const Session session,
OSB_LIB::StatusRequest request 
)

Create a status request.

Parameters:
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.

Parameters:
session Database session to use.
request The status request to lock.
noWait Don't wait if locked by another session?
Returns:
The object status of the status request.

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.

Parameters:
session Database session to use.
srId Id of the status request to lock.
noWait Don't wait if locked by another session?
Returns:
The object status of the status request (modified is not applicable).

bool OSB_DB::StatusRequestGw::remove ( const OSB_DB::Session session,
const OSB_LIB::StatusRequest request 
) [private]

Remove the status request from the database.

Parameters:
session Database session to use.
request Status request to delete.
Returns:
true if was removed from the database by the call to this function, else false.

bool OSB_DB::StatusRequestGw::updApplied ( const Session session,
const OSB_LIB::StatusRequest request 
) [private]

Mark a status request as applied.

Parameters:
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).
Returns:
true if a row was update, else false.


Friends And Related Function Documentation

friend class OSB_LIB::StatusRequest [friend]

Allow to call lock() and incObjVs().

Definition at line 87 of file statusrequest-gw.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:09:02 2006 for OSB Library by  doxygen 1.4.7