Definition at line 130 of file credit-gw.h.
OSB_DB::PersCreditGw::PersCreditGw | ( | const PersCreditGw & | rhs | ) | [private] |
Prevent copying: Copy constructor not implemented.
OSB_DB::PersCreditGw::PersCreditGw | ( | ) | [inline] |
bool OSB_DB::PersCreditGw::delPersCredit | ( | const Session & | session, | |
const OSB_LIB::PersCredit::Oid & | oid | |||
) |
Delete a personalized credit.
session | Database session to use. | |
oid | Unique id of personalized credit. |
bool OSB_DB::PersCreditGw::fetchPersCredit | ( | const Session & | session, | |
OSB_LIB::PersCredit & | persCredit | |||
) |
Load the personalized credit.
This function will load the personalized credit based on a specific id which is in persCredit.
session | Database session to use. | |
persCredit | Personalized credit. |
bool OSB_DB::PersCreditGw::insPersCredit | ( | const Session & | session, | |
const OSB_LIB::PersCredit & | persCredit | |||
) |
Insert a new personalized credit.
session | Database session to use. | |
persCredit | Personalized credit to be inserted. |
bool OSB_DB::PersCreditGw::lock | ( | const Session & | session, | |
const OSB_LIB::PersCredit::Oid & | oid | |||
) |
Lock the personalized credit.
The caller should commit or rollback after use this method.
This function doesn't have "nowait" argument. Because it will return true only if the lock is setted by itself, if the table has already been setted, call lock(...) with blocking will cause hang.
Note: This is not so nice because of the "not care" strategy. That means we don't care who lock the table and who unlock it.
session | Database session to use. | |
oid | Unique id of personalized credit. |
It | throws OsbException(172) if id mismatch. |
PersCreditGw& OSB_DB::PersCreditGw::operator= | ( | const PersCreditGw & | rhs | ) | [private] |
Prevent assignment: Assignment not implemented.
bool OSB_DB::PersCreditGw::unlock | ( | const Session & | session, | |
const OSB_LIB::PersCredit::Oid & | oid, | |||
bool | nowait | |||
) |
Unlock the personalized credit.
Unlock() does not commit. However, other sessions see the lock as released only after the transaction which unlocked it is completed.
Calling unlock() for a lock which is not held has no effect.
If unlock() is called in blocking mode from a session other than that which acquired the lock and before the locker commits, then unlock will block until the locker completes its transaction. If unlock() is called in non-blocking mode, it returns false in this case.
session | Database session to use. | |
oid | Unique id of personalized credit. | |
nowait | If the argument is false (blocking mode) then unlock() waits for the database resource to be released if it is busy. If it is true (non-blocking mode), unlock() immediately returns false if the lock could not be released because the database resource was busy. |
bool OSB_DB::PersCreditGw::updPersCredit | ( | const Session & | session, | |
const OSB_LIB::PersCredit & | persCredit | |||
) |
Update the current personalized credit.
session | Database session to use. | |
persCredit | Personalized credit to be updated. |
OsbException(169) | if currency code mismatch. | |
OsbException(172) | if id mismatch. |