OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Server.MPartner.Processing.TRecentPartnersHandling Class Reference

class TRecentPartnersHandling More...

Inheritance diagram for Ict.Petra.Server.MPartner.Processing.TRecentPartnersHandling:

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

Detailed Description

Member Function Documentation

◆ AddRecentlyUsedPartner()

static bool Ict.Petra.Server.MPartner.Processing.TRecentPartnersHandling.AddRecentlyUsedPartner ( Int64  APartnerKey,
TPartnerClass  APartnerClass,
bool  ANewPartner,
TLastPartnerUse  ALastPartnerUse,
TDataBase  ADataBase 
)
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!

Parameters
APartnerKeyKey of the partner that was recently used
APartnerClass
ANewPartnerIndicate if the partner is a new partner
ALastPartnerUseWhere is the partner used?
ADataBase
Returns
returns true if handling was successful

The documentation for this class was generated from the following file: