OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Server.MCommon.queries.ExtractQueryBase Class Referenceabstract

base class for extract queries on server side More...

Inheritance diagram for Ict.Petra.Server.MCommon.queries.ExtractQueryBase:
Ict.Petra.Server.MFinance.queries.QueryDonorByAmount Ict.Petra.Server.MFinance.queries.QueryDonorByField Ict.Petra.Server.MFinance.queries.QueryDonorByMiscellaneous Ict.Petra.Server.MFinance.queries.QueryDonorByMotivation Ict.Petra.Server.MFinance.queries.QueryRecipientByField Ict.Petra.Server.MPartner.queries.QueryFamilyExtractForPersons Ict.Petra.Server.MPartner.queries.QueryFamilyMembersExtract Ict.Petra.Server.MPartner.queries.QueryPartnerByCity Ict.Petra.Server.MPartner.queries.QueryPartnerByContactLog Ict.Petra.Server.MPartner.queries.QueryPartnerByGeneralCriteria Ict.Petra.Server.MPartner.queries.QueryPartnerByRelationship Ict.Petra.Server.MPartner.queries.QueryPartnerBySpecialType Ict.Petra.Server.MPartner.queries.QueryPartnerBySubscription Ict.Petra.Server.MPersonnel.queries.QueryPartnerByCommitment Ict.Petra.Server.MPersonnel.queries.QueryPartnerByEvent Ict.Petra.Server.MPersonnel.queries.QueryPartnerByEventRole Ict.Petra.Server.MPersonnel.queries.QueryPartnerByField

Public Member Functions

void PostcodeFilter (ref DataTable APartnerkeys, ref bool AAddressFilterAdded, TParameterList AParameters, TDBTransaction ATransaction)
 Filter data by postcode (if applicable) More...
 
bool AddressMeetsPostCodeCriteriaOrEmpty (string APostcode, String APostalRegion, String APostCodeFrom, String APostCodeTo)
 this will return true if the best address is in the given postal region, postcode range and county it will not reset the data returned by best address More...
 

Protected Member Functions

bool CalculateExtractInternal (TParameterList AParameters, string ASqlStmt, TResultList AResults)
 calculate an extract from a report: all partners of a given type (or selection of multiple types) More...
 
bool CalculateExtractInternal (TParameterList AParameters, string ASqlStmt, TResultList AResults, out int AExtractId)
 calculate an extract from a report: all partners of a given type (or selection of multiple types) More...
 
virtual bool RunSpecialTreatment (TParameterList AParameters, TDBTransaction ATransaction, out int AExtractId)
 This method needs to be implemented by extracts that can't follow the default processing with just one query. More...
 
abstract void RetrieveParameters (TParameterList AParameters, ref string ASqlStmt, ref List< OdbcParameter >ASqlParameterList)
 retrieve parameters from client sent in AParameters and build up AParameterList to run SQL query More...
 

Static Protected Member Functions

static bool AddAddressFilter (TParameterList AParameters, ref string ASqlStmt, ref List< OdbcParameter >AOdbcParameterList)
 extend query statement and query parameter list by address filter information given in extract parameters More...
 

Protected Attributes

bool FSpecialTreatment = false
 Extracts who need special treatment need to set this to true. It is needed if there is more than one query involved in running the extract. More...
 

Detailed Description

base class for extract queries on server side

Member Function Documentation

◆ AddAddressFilter()

static bool Ict.Petra.Server.MCommon.queries.ExtractQueryBase.AddAddressFilter ( TParameterList  AParameters,
ref string  ASqlStmt,
ref List< OdbcParameter >  AOdbcParameterList 
)
inlinestaticprotected

extend query statement and query parameter list by address filter information given in extract parameters

Parameters
AParameters
ASqlStmt
AOdbcParameterList
Returns
true if address tables and fields were added

◆ AddressMeetsPostCodeCriteriaOrEmpty()

bool Ict.Petra.Server.MCommon.queries.ExtractQueryBase.AddressMeetsPostCodeCriteriaOrEmpty ( string  APostcode,
String  APostalRegion,
String  APostCodeFrom,
String  APostCodeTo 
)
inline

this will return true if the best address is in the given postal region, postcode range and county it will not reset the data returned by best address

Returns
void

◆ CalculateExtractInternal() [1/2]

bool Ict.Petra.Server.MCommon.queries.ExtractQueryBase.CalculateExtractInternal ( TParameterList  AParameters,
string  ASqlStmt,
TResultList  AResults 
)
inlineprotected

calculate an extract from a report: all partners of a given type (or selection of multiple types)

Parameters
AParameters
ASqlStmt
AResults
Returns

◆ CalculateExtractInternal() [2/2]

bool Ict.Petra.Server.MCommon.queries.ExtractQueryBase.CalculateExtractInternal ( TParameterList  AParameters,
string  ASqlStmt,
TResultList  AResults,
out int  AExtractId 
)
inlineprotected

calculate an extract from a report: all partners of a given type (or selection of multiple types)

Parameters
AParameters
ASqlStmt
AResults
AExtractId
Returns

◆ PostcodeFilter()

void Ict.Petra.Server.MCommon.queries.ExtractQueryBase.PostcodeFilter ( ref DataTable  APartnerkeys,
ref bool  AAddressFilterAdded,
TParameterList  AParameters,
TDBTransaction  ATransaction 
)
inline

Filter data by postcode (if applicable)

Parameters
APartnerkeys
AAddressFilterAdded
AParameters
ATransaction

◆ RetrieveParameters()

◆ RunSpecialTreatment()

virtual bool Ict.Petra.Server.MCommon.queries.ExtractQueryBase.RunSpecialTreatment ( TParameterList  AParameters,
TDBTransaction  ATransaction,
out int  AExtractId 
)
inlineprotectedvirtual

This method needs to be implemented by extracts that can't follow the default processing with just one query.

Parameters
AParameters
ATransaction
AExtractId

Reimplemented in Ict.Petra.Server.MFinance.queries.QueryDonorByAmount, and Ict.Petra.Server.MPersonnel.queries.QueryPartnerByField.

Member Data Documentation

◆ FSpecialTreatment

bool Ict.Petra.Server.MCommon.queries.ExtractQueryBase.FSpecialTreatment = false
protected

Extracts who need special treatment need to set this to true. It is needed if there is more than one query involved in running the extract.


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