OpenPetra
Free Administration Software for Non-Profits
|
class TRecentPartnersHandling More...
Static Public Member Functions | |
static bool | AddRecentlyUsedPartner (Int64 APartnerKey, TPartnerClass APartnerClass, bool ANewPartner, TLastPartnerUse ALastPartnerUse, TDataBase ADataBase) |
Add Key of a recently used partner to the table that holds the keys of the recent partners. More... | |
class TRecentPartnersHandling
|
inlinestatic |
Add Key of a recently used partner to the table that holds the keys of the recent partners.
IMPORTANT: This Method has a built-in recovery mechanism that allows it to recover from an Exception that can be thrown due to the 'Predicate Locking' implementation in PostgreSQL. If the Method makes attempts to recover from that, it ROLLS BACK THE CURRENT DB TRANSACTION so that the next SQL Command can succeed. The Method will make MAX_SUBMIT_RETRIES attempts. If the Method was called while a DB Transaction was already running then this Method will have ROLLED BACK that DB Transaction in such a case and the Method will return false!!! If the caller cares about that (i.e. if it was writing to the DB in that DB Transaction) then the caller needs to re-do the writing to the DB if this Method returns 'false' as that DB Transaction was just rolled back!
APartnerKey | Key of the partner that was recently used |
APartnerClass | |
ANewPartner | Indicate if the partner is a new partner |
ALastPartnerUse | Where is the partner used? |
ADataBase |