OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Server.MPartner.Extracts.TExtractsHandling Class Reference

Contains Partner Module Extracts handling Business Objects. These Business Objects handle the retrieval, verification and saving of data. More...

Static Public Member Functions

static bool CreateNewExtract (String AExtractName, String AExtractDescription, out Int32 ANewExtractId, out Boolean AExtractAlreadyExists)
 Creates a new extract with the given extract name and extract description in the m_extract_master data table. The Extract Id and the Extract Name must both be unique in the Petra Database. More...
 
static bool DeleteExtract (int AExtractId, out bool AExtractNotDeletable, out TVerificationResult AVerificationResult)
 Deletes an Extract. More...
 
static bool CheckExtractExists (string AExtractName)
 Checks whether an Extract with a certain Extract Name exists. More...
 
static bool CheckExtractExists (int AExtractId)
 Checks whether an Extract with a certain Extract Id exists. More...
 
static Int32 GetExtractKeyCount (int AExtractId)
 Returns the Key Count of an Extract. More...
 
static bool UpdateExtractKeyCount (int AExtractId, int ACount, out TVerificationResultCollection AVerificationResult)
 Updates the KeyCount on an Extract. More...
 
static bool AddPartnerToExtract (Int64 APartnerKey, int AExtractId)
 Adds a Partner to an Extract, if they are not already present More...
 
static bool AddPartnerToExtract (Int64 APartnerKey, TLocationPK ALocationPK, int AExtractId)
 Adds a Partner to an Extract, if they are not already present More...
 
static bool CreateExtractFromListOfPartnerKeys (String AExtractName, String AExtractDescription, out Int32 ANewExtractId, DataTable APartnerKeysTable, Int32 APartnerKeyColumn, bool AAddressFilterAdded, out Int32 AKeyCount, out List< long >AIgnoredKeyList, bool AIgnoreDuplicates=true, bool AIgnoreInactive=false, bool AIgnoreNonMailingLocations=false, bool AIgnoreNoSolicitations=false)
 create an extract from a list of best addresses More...
 
static bool CreateExtractFromListOfPartnerKeys (String AExtractName, String AExtractDescription, out Int32 ANewExtractId, DataTable APartnerKeysTable, Int32 APartnerKeyColumn, Int32 ASiteKeyColumn, Int32 ALocationKeyColumn, out Int32 AKeyCount, out List< long >AIgnoredKeyList, bool AIgnoreDuplicates=true, bool AIgnoreInactive=false, bool AIgnoreNonMailingLocations=false, bool AIgnoreNoSolicitations=true)
 create an extract from a list of best addresses More...
 
static void ExtendExtractFromListOfPartnerKeys (Int32 AExtractId, DataTable APartnerKeysTable, Int32 APartnerKeyColumn, bool AAddressFilterAdded, out Int32 AKeyCount, out List< long >AIgnoredKeyList, bool AIgnoreDuplicates, bool AIgnoreInactive=false, bool AIgnoreNonMailingLocations=false, bool AIgnoreNoSolicitations=true)
 create an extract from a list of best addresses More...
 
static void ExtendExtractFromListOfPartnerKeys (Int32 AExtractId, DataTable APartnerKeysTable, Int32 APartnerKeyColumn, Int32 ASiteKeyColumn, Int32 ALocationKeyColumn, out Int32 AKeyCount, out List< long >AIgnoredKeyList, bool AIgnoreDuplicates, bool AIgnoreInactive, bool AIgnoreNonMailingLocations, bool AIgnoreNoSolicitations)
 extend an extract from a list of best addresses More...
 

Detailed Description

Contains Partner Module Extracts handling Business Objects. These Business Objects handle the retrieval, verification and saving of data.

@Comment These Business Objects can be instantiated by other Server Objects (usually UIConnectors).

Member Function Documentation

◆ AddPartnerToExtract() [1/2]

static bool Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.AddPartnerToExtract ( Int64  APartnerKey,
int  AExtractId 
)
inlinestatic

Adds a Partner to an Extract, if they are not already present

Parameters
APartnerKeyPartnerKey of Partner
AExtractIdExtractId of the Extract that the Partner should get added to.
Returns
True if the Partner was added to the Extract, otherwise false.

◆ AddPartnerToExtract() [2/2]

static bool Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.AddPartnerToExtract ( Int64  APartnerKey,
TLocationPK  ALocationPK,
int  AExtractId 
)
inlinestatic

Adds a Partner to an Extract, if they are not already present

Parameters
APartnerKeyPartnerKey of Partner
ALocationPKLocation PK of a Partner's PartnerLocation (usually the LocationPK of the 'Best Address' of the Partner).
AExtractIdExtractId of the Extract that the Partner should get added to.
Returns
True if the Partner was added to the Extract, otherwise false.

◆ CheckExtractExists() [1/2]

static bool Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.CheckExtractExists ( int  AExtractId)
inlinestatic

Checks whether an Extract with a certain Extract Id exists.

Parameters
AExtractId
Returns
True if an Extract with the specified Extract Id exists, otherwise false.

◆ CheckExtractExists() [2/2]

static bool Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.CheckExtractExists ( string  AExtractName)
inlinestatic

Checks whether an Extract with a certain Extract Name exists.

Parameters
AExtractNameName of the Extract to check for.
Returns
True if an Extract with the specified Extract Name exists, otherwise false.

◆ CreateExtractFromListOfPartnerKeys() [1/2]

static bool Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.CreateExtractFromListOfPartnerKeys ( String  AExtractName,
String  AExtractDescription,
out Int32  ANewExtractId,
DataTable  APartnerKeysTable,
Int32  APartnerKeyColumn,
bool  AAddressFilterAdded,
out Int32  AKeyCount,
out List< long >  AIgnoredKeyList,
bool  AIgnoreDuplicates = true,
bool  AIgnoreInactive = false,
bool  AIgnoreNonMailingLocations = false,
bool  AIgnoreNoSolicitations = false 
)
inlinestatic

create an extract from a list of best addresses

Parameters
AExtractNameName of the Extract to be created.
AExtractDescriptionDescription of the Extract to be created.
ANewExtractIdExtract Id of the created Extract, or -1 if the creation of the Extract was not successful.
APartnerKeysTable
APartnerKeyColumnnumber of the column that contains the partner keys
AAddressFilterAddedtrue if location key fields exist in APartnerKeysTable
AKeyCountThe number of keys that were actually added to the extract (any duplicates are excluded)
AIgnoredKeyListA reference to a List of long. The server will fill this with the partner keys that were ignored. Does not include duplicates.
AIgnoreDuplicates
AIgnoreInactivetrue if inactive partners should be ignored
AIgnoreNonMailingLocationstrue to ignore if the partner's best address is a non-mailing location
AIgnoreNoSolicitationstrue to ignore partners where the No Solicitations flag is set
Returns
True if the new Extract was created, otherwise false.

◆ CreateExtractFromListOfPartnerKeys() [2/2]

static bool Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.CreateExtractFromListOfPartnerKeys ( String  AExtractName,
String  AExtractDescription,
out Int32  ANewExtractId,
DataTable  APartnerKeysTable,
Int32  APartnerKeyColumn,
Int32  ASiteKeyColumn,
Int32  ALocationKeyColumn,
out Int32  AKeyCount,
out List< long >  AIgnoredKeyList,
bool  AIgnoreDuplicates = true,
bool  AIgnoreInactive = false,
bool  AIgnoreNonMailingLocations = false,
bool  AIgnoreNoSolicitations = true 
)
inlinestatic

create an extract from a list of best addresses

Parameters
AExtractNameName of the Extract to be created.
AExtractDescriptionDescription of the Extract to be created.
ANewExtractIdExtract Id of the created Extract, or -1 if the creation of the Extract was not successful.
APartnerKeysTable
APartnerKeyColumnnumber of the column that contains the partner keys
ASiteKeyColumnnumber of the column that contains the site keys
ALocationKeyColumnnumber of the column that contains the location keys
AKeyCountThe number of keys that were actually added to the extract (any duplicates are excluded)
AIgnoredKeyListA reference to a List of long. The server will fill this with the partner keys that were ignored. Does not include duplicates.
AIgnoreDuplicates
AIgnoreInactivetrue if inactive partners should be ignored
AIgnoreNonMailingLocationstrue to ignore if the partner's best address is a non-mailing location
AIgnoreNoSolicitationstrue to ignore partners where the No Solicitations flag is set
Returns
True if the new Extract was created, otherwise false.

◆ CreateNewExtract()

static bool Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.CreateNewExtract ( String  AExtractName,
String  AExtractDescription,
out Int32  ANewExtractId,
out Boolean  AExtractAlreadyExists 
)
inlinestatic

Creates a new extract with the given extract name and extract description in the m_extract_master data table. The Extract Id and the Extract Name must both be unique in the Petra Database.

Parameters
AExtractNameName of the Extract to be created.
AExtractDescriptionDescription of the Extract to be created.
ANewExtractIdExtract Id of the created Extract, or -1 if the creation of the Extract was not successful.
AExtractAlreadyExistsTrue if there is already an extract with the given name, otherwise false.
Returns
True if the new Extract was created, otherwise false.

◆ DeleteExtract()

static bool Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.DeleteExtract ( int  AExtractId,
out bool  AExtractNotDeletable,
out TVerificationResult  AVerificationResult 
)
inlinestatic

Deletes an Extract.

Parameters
AExtractIdExtractId of the Extract that should get deleted.
AExtractNotDeletableTrue if the Deletable Flag of the Extract if false.
AVerificationResultNil if all verifications are OK, otherwise filled with a TVerificationResult object.
Returns
True if the Extract was deleted, otherwise false.

◆ ExtendExtractFromListOfPartnerKeys() [1/2]

static void Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.ExtendExtractFromListOfPartnerKeys ( Int32  AExtractId,
DataTable  APartnerKeysTable,
Int32  APartnerKeyColumn,
bool  AAddressFilterAdded,
out Int32  AKeyCount,
out List< long >  AIgnoredKeyList,
bool  AIgnoreDuplicates,
bool  AIgnoreInactive = false,
bool  AIgnoreNonMailingLocations = false,
bool  AIgnoreNoSolicitations = true 
)
inlinestatic

create an extract from a list of best addresses

Parameters
AExtractIdExtract Id of the Extract to extend
APartnerKeysTable
APartnerKeyColumnnumber of the column that contains the partner keys
AAddressFilterAddedtrue if location key fields exist in APartnerKeysTable
AKeyCountThe number of keys that were actually added to the extract (any duplicates are excluded)
AIgnoredKeyListA reference to a List of long. The server will fill this with the partner keys that were ignored. Does not include duplicates.
AIgnoreDuplicatestrue if duplicates should be looked out for. Can be set to false if called only once and not several times per extract.
AIgnoreInactivetrue if inactive partners should be ignored
AIgnoreNonMailingLocationstrue to ignore if the partner's best address is a non-mailing location
AIgnoreNoSolicitationstrue to ignore partners where the No Solicitations flag is set

◆ ExtendExtractFromListOfPartnerKeys() [2/2]

static void Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.ExtendExtractFromListOfPartnerKeys ( Int32  AExtractId,
DataTable  APartnerKeysTable,
Int32  APartnerKeyColumn,
Int32  ASiteKeyColumn,
Int32  ALocationKeyColumn,
out Int32  AKeyCount,
out List< long >  AIgnoredKeyList,
bool  AIgnoreDuplicates,
bool  AIgnoreInactive,
bool  AIgnoreNonMailingLocations,
bool  AIgnoreNoSolicitations 
)
inlinestatic

extend an extract from a list of best addresses

Parameters
AExtractIdExtract Id of the Extract to extend
APartnerKeysTable
APartnerKeyColumnnumber of the column that contains the partner keys
ASiteKeyColumnnumber of the column that contains the site keys
ALocationKeyColumnnumber of the column that contains the location keys
AKeyCountThe number of keys that were actually added to the extract (any duplicates are excluded)
AIgnoredKeyListA reference to a List of long. If not null the server will fill it with the partner keys that were ignored. Does not include duplicates.
AIgnoreDuplicatestrue if duplicates should be looked out for. Can be set to false if called only once and not several times per extract.
AIgnoreInactivetrue if inactive partners should be ignored
AIgnoreNonMailingLocationstrue to ignore if the partner's best address is a non-mailing location
AIgnoreNoSolicitationstrue to ignore partners where the No Solicitations flag is set

◆ GetExtractKeyCount()

static Int32 Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.GetExtractKeyCount ( int  AExtractId)
inlinestatic

Returns the Key Count of an Extract.

Parameters
AExtractIdExtractId of the Extract that the KeyCount should get returned for.
Returns
The Key Count of the Extract, or -1 if the Extract with the given Extract Id doesn't exist.

◆ UpdateExtractKeyCount()

static bool Ict.Petra.Server.MPartner.Extracts.TExtractsHandling.UpdateExtractKeyCount ( int  AExtractId,
int  ACount,
out TVerificationResultCollection  AVerificationResult 
)
inlinestatic

Updates the KeyCount on an Extract.

Parameters
AExtractIdExtractId of the Extract that the KeyCount should get updated for.
ACountNew Key Count.
AVerificationResultContains errors or DB call exceptions, if there are any.
Returns
True if the updating was successful, otherwise false.

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