The class describes the request to change the perferred activation status of a contract related classes.
Definition at line 78 of file statusrequest.h.
typedef Id<StatusRequest> OSB_LIB::StatusRequest::Oid |
Type of cascade flag.
See cascade() for details.
cscdNone | No cascading of status request. |
cscdOwner | Owner of cascading status request. |
cscdByParent | Status request cascaded by parent. |
Definition at line 98 of file statusrequest.h.
Constructor with optional object id.
OSB_LIB::StatusRequest::StatusRequest | ( | const StatusValue | s, | |
const StatusReason::Oid & | r | |||
) |
Construct with requested status and reason.
const DateTime& OSB_LIB::StatusRequest::applied | ( | ) | const |
Date and time when the requested status was applied.
StatusRequest::Cascade OSB_LIB::StatusRequest::cascade | ( | ) | const [inline] |
Flag if the request is cascaded.
The flag is used only for the initial activation, i.e., created to activated; else it is silently ignored.
Definition at line 478 of file statusrequest.h.
References cascade_.
const DateTime& OSB_LIB::StatusRequest::entered | ( | ) | const |
Date and time when the status request was entered.
const std::string& OSB_LIB::StatusRequest::errCode | ( | ) | const |
The code of the first encountered error during processing.
It is empty if the request was processed without errors.
GeValidFrom OSB_LIB::StatusRequest::geValidFrom | ( | ) | const |
Get predicate for greater-equal comparision of validFrom().
static void OSB_LIB::StatusRequest::handleObjectStatus | ( | ObjectStatus | os, | |
const Oid & | id | |||
) | [static, private] |
Evalute the object status of a request.
os | Object status to evaluate. | |
id | The id of the request for which os is valid. |
ObjectDeleted | ||
ObjectModified | ||
ObjectBusy | if noWait is true and the request is locked by another database session. |
void OSB_LIB::StatusRequest::incObjVs | ( | const OSB_DB::Session & | session | ) | [private] |
Increment the object version by 1.
session | Database session to use. |
OsbException | (internal error) if the update of the object version in the database fails. |
void OSB_LIB::StatusRequest::lock | ( | const OSB_DB::Session & | session, | |
bool | noWait | |||
) | const [private] |
Lock a request in the database.
session | Database session to use. | |
noWait | Don't wait for database locks? |
OsbException | from handleObjectStatus(). |
static void OSB_LIB::StatusRequest::lock | ( | const OSB_DB::Session & | session, | |
const Oid & | id, | |||
bool | noWait | |||
) | [static, private] |
Lock a request in the database.
session | Database session to use. | |
id | The object id of the request to lock. | |
noWait | Don't wait for database locks? |
OsbException | from handleObjectStatus(), (ObjectModified is not applicable). |
const StatusRequest::Oid OSB_LIB::StatusRequest::oid | ( | ) | const [inline] |
Get the id of the status request.
Definition at line 468 of file statusrequest.h.
References oid_.
Referenced by OSB_LIB::StatusRequests::Cmp::operator()().
void OSB_LIB::StatusRequest::read | ( | const OSB_DB::Session & | session, | |
bool | lockFirst | |||
) | [private] |
Read the status request from the database.
session | Database session to use. | |
lockFirst | Flag to lock the request before reading. |
OsbException | if the request does not exist in the database. | |
OsbException | from handleObjectStatus() if lockFirst is true. |
void OSB_LIB::StatusRequest::read | ( | const OSB_DB::Session & | session | ) |
Read the status request from the database.
session | Database session to use. |
OsbException | if the request does not exist in the database. |
const StatusReason::Oid OSB_LIB::StatusRequest::reason | ( | ) | const |
Reason for the requested status.
bool OSB_LIB::StatusRequest::remove | ( | const OSB_DB::Session & | session | ) | [private] |
Remove the status request from the database.
session | Database session to use. |
OsbException | from incObjVs(). |
const StatusValue OSB_LIB::StatusRequest::reqStatus | ( | ) | const |
Requested status of entity.
void OSB_LIB::StatusRequest::setCascade | ( | Cascade | cascade | ) |
Set the cascading flag, see cascade() for details.
Use cscdOwner to request a cascading initial activation, cscdByParent is used internally by the contractual entities.
void OSB_LIB::StatusRequest::setReqStatus | ( | const Status & | status | ) |
Set the requested status and reason.
void OSB_LIB::StatusRequest::setValidFrom | ( | const DateTime & | validFrom | ) |
Set date and time for the requested status.
const Status & OSB_LIB::StatusRequest::status | ( | ) | const [inline] |
Requested status and reason of entity.
Definition at line 473 of file statusrequest.h.
References reqStatus_.
void OSB_LIB::StatusRequest::updApplied | ( | const OSB_DB::Session & | session, | |
bool | noWait | |||
) |
Mark the request as applied.
session | Database session to use. | |
noWait | Don't wait for database locks? |
OsbException | from lock(const OSB_DB::Session&, bool) const, see there. |
const DateTime & OSB_LIB::StatusRequest::validFrom | ( | ) | const [inline] |
Date and time when the requested status becomes valid.
Definition at line 483 of file statusrequest.h.
References validFrom_.
Referenced by OSB_LIB::StatusRequests::Cmp::operator()(), and OSB_LIB::StatusRequest::GeValidFrom::operator()().
friend struct ::StatusRequestRow [friend] |
friend class OSB_DB::StatusRequestGw [friend] |
friend class RequestHandler [friend] |
Allow locking, removal and to set applied, error code.
Definition at line 82 of file statusrequest.h.
DateTime OSB_LIB::StatusRequest::applied_ [private] |
Date and time when the requested status was applied.
Definition at line 299 of file statusrequest.h.
Cascade OSB_LIB::StatusRequest::cascade_ [private] |
Cascade flag, see cascade for details.
Definition at line 295 of file statusrequest.h.
Referenced by cascade().
DateTime OSB_LIB::StatusRequest::entered_ [private] |
std::string OSB_LIB::StatusRequest::errCode_ [private] |
The code of the first encountered error during processing.
Definition at line 303 of file statusrequest.h.
long OSB_LIB::StatusRequest::objVs_ [private] |
Oid OSB_LIB::StatusRequest::oid_ [private] |
Unique identification: database link.
Definition at line 289 of file statusrequest.h.
Referenced by oid().
Status OSB_LIB::StatusRequest::reqStatus_ [private] |
DateTime OSB_LIB::StatusRequest::validFrom_ [private] |
Date and time when the requested status becomes valid.
Definition at line 297 of file statusrequest.h.
Referenced by validFrom().