Definition at line 64 of file resource-gw.h.
bool OSB_DB::ResourceGw::fetch | ( | const Session & | session, | |
OSB_LIB::Resource & | resource | |||
) | const [private] |
Read a resource from the database.
The function reads a resource as identified by its object id from the table NETWORK_RESOURCE.
session | Database session to use. | |
resource | Resource to populate. |
OSB_LIB::Period OSB_DB::ResourceGw::getBounds | ( | const Session & | session, | |
const OSB_LIB::ResourceKey & | resourceKey, | |||
const OSB_LIB::DateTime & | timestamp | |||
) |
Get assignment boundaries of a resource.
The function determines the end of the previous and begin of the next assignment of a resource to a pers. product.
session | Database session to use. | |
resourceKey | Resource key for which to determine the personalized product. | |
timestamp | Timestamp for which to search. |
OSB_LIB::Id<OSB_LIB::PersProduct> OSB_DB::ResourceGw::getPersProduct | ( | const Session & | session, | |
const OSB_LIB::ResourceKey & | resourceKey, | |||
const OSB_LIB::DateTime & | timestamp, | |||
OSB_LIB::Period & | assigned | |||
) | const |
Get the id of the personalized product.
Uses the resource key (resource type, resource number, the id of the network and network element) to determine the personalized product that has (had) the resource assigned at ts.
session | Database session to use. | |
resourceKey | Resource key to look for. | |
timestamp | Date and time for which the personalized product should be determined. If ts is not set, the behavior of the function is undefined. | |
assigned | Gets the time period containing timestamp, during which the resource was assigned to the personalized product. If no pers. product is assigned to the resource at ts, the period will contain the end of the previous assignment and the begin of the next assignment. |
OsbException | if more than one personalized product is found. |
bool OSB_DB::ResourceGw::getPersResourceStatus | ( | const Session & | session, | |
const OSB_LIB::Resource::Oid & | rid, | |||
const OSB_LIB::DateTime & | ts, | |||
OSB_LIB::Status & | status | |||
) | [private] |
Get the pers resource and its current status.
The function is implemented as explained for OSB_LIB::Resource::getPersResourceStatus(), see there for a detailed explanation of the parameters.
session | Database session to use. | |
rid | Resource for which to determine the status of the personalized node. | |
ts | Timestamp for which to search. | |
status | Gets the current effective status of the pers. node the which the resource is assigned at ts. |
OsbException |
|
bool OSB_DB::ResourceGw::getQuarantineDays | ( | const Session & | session, | |
OSB_LIB::ResourceType | rt, | |||
long & | days | |||
) | const [private] |
Set the quarantine status a of resource in the database.
session | Database session to use. | |
rt | Resource type to look-up | |
days | Gets the number of quarantine days, -1 if the resource type can not be reassigned. |
bool OSB_DB::ResourceGw::incObjVs | ( | const Session & | session, | |
OSB_LIB::Resource & | resource | |||
) | [private] |
Increment the object version of the resource in the database.
session | Database session to use. | |
resource | Resource for which to increment the object version. If the function returns true its object version is set to the new version in the database. |
bool OSB_DB::ResourceGw::insert | ( | const Session & | session, | |
OSB_LIB::Resource & | resource | |||
) | const [private] |
Insert a resource into the database.
session | Database session to use. | |
resource | Resource to insert. |
OsbException |
| |
DbException |
|
OSB_LIB::ObjectStatus OSB_DB::ResourceGw::lock | ( | const Session & | session, | |
const OSB_LIB::Resource & | resource, | |||
bool | noWait | |||
) | [private] |
Check the current object version of resource.
session | Database session to use. | |
resource | Resource to lock. | |
noWait | Don't wait if locked by another session? |
bool OSB_DB::ResourceGw::remove | ( | const Session & | session, | |
const OSB_LIB::Resource & | resource | |||
) | const [private] |
Delete a resource from the database.
session | Database session to use. | |
resource | Resource to delete. |
bool OSB_DB::ResourceGw::updAssigned | ( | const Session & | session, | |
const OSB_LIB::Resource & | resource | |||
) | const [private] |
Set the first assignment date of the resource.
session | Database session to use. | |
resource | Resource for which to update the first assignment date. |
bool OSB_DB::ResourceGw::updData | ( | const Session & | session, | |
const OSB_LIB::Resource & | resource | |||
) | const [private] |
Update resource data in the database.
session | Database session to use. | |
resource | Resource to update. |
void OSB_DB::ResourceGw::updStatus | ( | const Session & | session, | |
const OSB_LIB::Resource & | resource | |||
) | const [private] |
Update the status of a resource in the database.
session | Database session to use. | |
resource | Resource to update the status. |
friend class OSB_LIB::Resource [friend] |