Show / Hide Table of Contents

Class SelectionContactPersonExtender

The SelectionContactPersonExtender extends a contact with persons, if at least one person-related condition has been set (this happens in the ContactPersonAsEntityExtenderBase base class, and requests the PersonExtenderBase.SelectionPerson set of features from the PersonExtenderBase.

Inheritance
object
ExtensibleColumnsBase
ExtenderBase<PersonTableInfo>
TableExtenderBase<PersonTableInfo>
PersonExtenderBase
CombinedPersonExtenderBase
ContactPersonExtender
ContactPersonAsEntityExtenderBase
SelectionContactPersonExtender
Implements
IArchiveProviderQueryMapping
IArchiveExtender
IArchiveProviderDoesExtend
IArchiveProviderHasColumns
IArchiveProviderExtensible
Inherited Members
ContactPersonExtender._ourPerson
ContactPersonExtender.AllowRightJoin
CombinedPersonExtenderBase._colWho
CombinedPersonExtenderBase.SetDesiredColumns(params string[])
CombinedPersonExtenderBase.ContactIdField
PersonExtenderBase._contactExtender
PersonExtenderBase._contactTable
PersonExtenderBase._personHelper
PersonExtenderBase.ColCategory
PersonExtenderBase.ColPersonHasInterests
PersonExtenderBase.ColFullName
PersonExtenderBase._colPersonId
PersonExtenderBase._colFirstName
PersonExtenderBase._colLastName
PersonExtenderBase._colMiddleName
PersonExtenderBase._colFullName
PersonExtenderBase._colFullNameWithContact
PersonExtenderBase._colContactId
PersonExtenderBase._colHasInfoText
PersonExtenderBase._colHasInterests
PersonExtenderBase._colPersonHasInterests
PersonExtenderBase._colMrMrs
PersonExtenderBase._colPosition
PersonExtenderBase._colNumber
PersonExtenderBase._colAcademic
PersonExtenderBase._colTitle
PersonExtenderBase._colCountry
PersonExtenderBase._colCountryId
PersonExtenderBase.ColumnNoMail
PersonExtenderBase._colNoMailings
PersonExtenderBase._colRank
PersonExtenderBase._colBirthDate
PersonExtenderBase._colAssociateType
PersonExtenderBase._colUseAsMailingAddress
PersonExtenderBase._colSource
PersonExtenderBase.ColumnRetired
PersonExtenderBase._colRetired
PersonExtenderBase._colBirthYear
PersonExtenderBase._colBirthMonth
PersonExtenderBase._colBirthDay
PersonExtenderBase._colKanaFirstname
PersonExtenderBase._colKanaLastname
PersonExtenderBase._colUpdatedBy
PersonExtenderBase._colUpdatedByFullName
PersonExtenderBase._colUpdatedDate
PersonExtenderBase._colRegisteredBy
PersonExtenderBase._colRegisteredByFullName
PersonExtenderBase._colRegisteredDate
PersonExtenderBase._colPortrait
PersonExtenderBase._colActiveErpLinks
PersonExtenderBase._colTicketPriority
PersonExtenderBase._colSupportLanguage
PersonExtenderBase._colSupportAssociate
PersonExtenderBase._colSupportAssociateFullName
PersonExtenderBase._colAssociateId
PersonExtenderBase._colAssociateFullName
PersonExtenderBase._colCategory
PersonExtenderBase._colBusiness
PersonExtenderBase._colDeletedDate
PersonExtenderBase._colHasCompany
PersonExtenderBase._colIsProjectMember
PersonExtenderBase._colIsStakeholder
PersonExtenderBase._colUpdatedByWorkflow
PersonExtenderBase._colWhenUpdatedByWorkflow
PersonExtenderBase._colCreatedByForm
PersonExtenderBase._colPhone
PersonExtenderBase.StandardFullName()
PersonExtenderBase.Initialize(PersonExtenderBase.Features, string, string)
PersonExtenderBase.InnerModifyQuery()
PersonExtenderBase.SupportLanguage
PersonExtenderBase.DropStoppedContacts
PersonExtenderBase.DropRetiredPersons
TableExtenderBase<PersonTableInfo>._ourTable
TableExtenderBase<PersonTableInfo>.ModifyQuery()
TableExtenderBase<PersonTableInfo>.TableToExtend
TableExtenderBase<PersonTableInfo>.MainTableName
ExtenderBase<PersonTableInfo>.GetRankRestriction(FieldInfo)
ExtenderBase<PersonTableInfo>.StyleHintPrefix
ExtensibleColumnsBase._minuteFields
ExtensibleColumnsBase.Visible
ExtensibleColumnsBase.Invisible
ExtensibleColumnsBase.AllowOrderBy
ExtensibleColumnsBase.DenyOrderBy
ExtensibleColumnsBase.GetAllRestriction
ExtensibleColumnsBase.GetNoneRestriction
ExtensibleColumnsBase.GetNameOrOverrideName(string)
ExtensibleColumnsBase.SetParent(IArchiveProviderExtensible)
ExtensibleColumnsBase.AddAvailableColumn(params ArchiveColumnInfo[])
ExtensibleColumnsBase.GetAvailableColumns()
ExtensibleColumnsBase.SetOrderBy(ArchiveOrderByInfo[])
ExtensibleColumnsBase.SetOrderByMapping(string, params string[])
ExtensibleColumnsBase.SetOrderByMapping(ArchiveColumnInfo, params ArchiveColumnInfo[])
ExtensibleColumnsBase.SetPrefixes(string, string)
ExtensibleColumnsBase.SetLocalAbsolutePrefixes(string, string)
ExtensibleColumnsBase.SetIconHint(string)
ExtensibleColumnsBase.AddLocalRestriction(params ArchiveRestrictionInfo[])
ExtensibleColumnsBase.AddExtensionProvider(IArchiveExtender)
ExtensibleColumnsBase.GetExtensionProviders()
ExtensibleColumnsBase.GetTableInfosFromExtensionProviders()
ExtensibleColumnsBase.PopulateRowFromReaderAsync(SoDataReader, ArchiveRow, CancellationToken)
ExtensibleColumnsBase.SuppressTableResults(SoDataReader, TableInfo)
ExtensibleColumnsBase.SuppressDeepTableResults(SoDataReader, TableInfo)
ExtensibleColumnsBase.AddColumnNameOverride(string, string)
ExtensibleColumnsBase.ApplyColumnNameOverridesToRestrictions()
ExtensibleColumnsBase.ApplyColumnNameOverrides(ArchiveRow)
ExtensibleColumnsBase.AddSubExtenderMapping(string, params ExtensibleColumnsBase[])
ExtensibleColumnsBase.WantColumnForOutput(params string[])
ExtensibleColumnsBase.WantColumnForOutput(params ArchiveColumnInfo[])
ExtensibleColumnsBase.WantColumnForOutput(List<ArchiveColumnInfo>)
ExtensibleColumnsBase.WantColumnForRestriction(params string[])
ExtensibleColumnsBase.WantColumnForRestriction(params ArchiveColumnInfo[])
ExtensibleColumnsBase.WantColumnForOrderBy(params string[])
ExtensibleColumnsBase.GetColumnOrderBy(string)
ExtensibleColumnsBase.WantColumnForOrderBy(params ArchiveColumnInfo[])
ExtensibleColumnsBase.WantColumnForAnything(params string[])
ExtensibleColumnsBase.WantColumnForAnything(params ArchiveColumnInfo[])
ExtensibleColumnsBase.IsQueryNeeded()
ExtensibleColumnsBase.IsQueryRestriction()
ExtensibleColumnsBase.GetLeftOuterOrInnerJoin(Equal)
ExtensibleColumnsBase.GetLeftOuterOrInnerJoin(Equal, Restriction)
ExtensibleColumnsBase.SetLeftOuterJoin(Equal)
ExtensibleColumnsBase.SetLeftOuterJoin(Equal, Restriction)
ExtensibleColumnsBase.SetLeftOuterOrInnerJoin(Equal)
ExtensibleColumnsBase.SetLeftOuterOrInnerJoin(Equal, Restriction)
ExtensibleColumnsBase.MapReturnField(ArchiveSelect, FieldInfo, bool, string, params ArchiveColumnInfo[])
ExtensibleColumnsBase.MapIdField(FieldInfo)
ExtensibleColumnsBase.MapAssociateField(FieldInfo, ArchiveColumnInfo, bool)
ExtensibleColumnsBase.MapEjUserField(FieldInfo, ArchiveColumnInfo)
ExtensibleColumnsBase.MapSimpleReturnField(FieldInfo, params ArchiveColumnInfo[])
ExtensibleColumnsBase.MapSimpleImageField(FieldInfo, ArchiveColumnInfo, int, int)
ExtensibleColumnsBase.MapPictureBlob(FieldInfo, ArchiveColumnInfo, BlobLinkType, int, int, int)
ExtensibleColumnsBase.MapSimpleCustomField(FieldInfo, params ArchiveColumnInfo[])
ExtensibleColumnsBase.MapSimpleListReturnField(FieldInfo, string, params ArchiveColumnInfo[])
ExtensibleColumnsBase.MapOrderByField(FieldInfo, ArchiveColumnInfo)
ExtensibleColumnsBase.ActivateAsLinkField(string, params ArchiveColumnInfo[])
ExtensibleColumnsBase.HasAvailableColumn(string)
ExtensibleColumnsBase.AddAndInitializeExtensionProvider<ExtenderType>(ExtenderType, string, string)
ExtensibleColumnsBase.AddAndInitializeExtensionProvider<ExtenderType>(ExtenderType)
ExtensibleColumnsBase.HasRestriction(string)
ExtensibleColumnsBase.ExtractRestrictions(string)
ExtensibleColumnsBase.ExtractRestrictions(ArchiveColumnInfo)
ExtensibleColumnsBase.ExtractRestriction(string)
ExtensibleColumnsBase.ExtractRestriction(ArchiveColumnInfo)
ExtensibleColumnsBase.ProcessRestrictions()
ExtensibleColumnsBase.ProcessOrderBy()
ExtensibleColumnsBase.PopulateSimpleFieldsAsync(SoDataReader, ArchiveRow, CancellationToken)
ExtensibleColumnsBase.CalculateOrderbyValue(string, SoDataReader, ArchiveColumnData)
ExtensibleColumnsBase.AddDbInfo(ArchiveColumnData, FieldInfo)
ExtensibleColumnsBase.AddDbInfo(ArchiveColumnData, int)
ExtensibleColumnsBase.ForceDisable()
ExtensibleColumnsBase.GetAssociateData(int)
ExtensibleColumnsBase.GetEjUserData(int)
ExtensibleColumnsBase.GetColumnIndex(ArchiveColumnInfo)
ExtensibleColumnsBase.GetColumnIndexFromReader(SoDataReader, FieldInfo, ref int)
ExtensibleColumnsBase.ConvertDbTypeToString(object, ExtensibleColumnsBase.DbColumnBinding)
ExtensibleColumnsBase.GetStandardTooltipHint(SoDataReader, FieldInfo)
ExtensibleColumnsBase.GetLinkHint(SoDataReader, string)
ExtensibleColumnsBase.SetNonZeroBoolRestriction(ArchiveColumnInfo)
ExtensibleColumnsBase.AddUpdatedByMapping(ArchiveColumnInfo, FieldInfo, FieldInfo)
ExtensibleColumnsBase.AddRegisteredMapping(ArchiveColumnInfo, FieldInfo, ArchiveColumnInfo, FieldInfo)
ExtensibleColumnsBase.AddLastUpdatedMapping(ArchiveColumnInfo, FieldInfo, FieldInfo)
ExtensibleColumnsBase.AddUpdatedBy(SoDataReader, ArchiveRow, ArchiveColumnInfo, FieldInfo, FieldInfo)
ExtensibleColumnsBase.AddUpdatedDate(SoDataReader, ArchiveRow, ArchiveColumnInfo, FieldInfo, FieldInfo, bool)
ExtensibleColumnsBase.AddAssociateFullName(SoDataReader, ArchiveRow, ArchiveColumnInfo, params FieldInfo[])
ExtensibleColumnsBase.GetIdFieldTag(SoDataReader)
ExtensibleColumnsBase.GetArchiveColumnName(SoField)
ExtensibleColumnsBase.ExtensibleHelper
ExtensibleColumnsBase.ColumnHelper
ExtensibleColumnsBase.RestrictionHelper
ExtensibleColumnsBase.Parent
ExtensibleColumnsBase.DisableSubtreeIfNoRestriction
ExtensibleColumnsBase.RestrictionSetForSubtree
ExtensibleColumnsBase.ForceQueryNeeded
ExtensibleColumnsBase.ForceRestriction
ExtensibleColumnsBase.BlockOrderBy
ExtensibleColumnsBase.IdField
ExtensibleColumnsBase.LastSubExtenderWins
ExtensibleColumnsBase.ParentPrimaryKey
ExtensibleColumnsBase.QuoteAlternativeId
ExtensibleColumnsBase.SaleId
ExtensibleColumnsBase.NamePrefix
ExtensibleColumnsBase.DisplayNamePrefix
ExtensibleColumnsBase.RootQuery
ExtensibleColumnsBase.OrderBySlots
ExtensibleColumnsBase.PopulateDisplayValue
ExtensibleColumnsBase.PopulateTooltipHint
ExtensibleColumnsBase.DebugXML
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class SelectionContactPersonExtender : ContactPersonAsEntityExtenderBase, IArchiveProviderQueryMapping, IArchiveExtender, IArchiveProviderDoesExtend, IArchiveProviderHasColumns, IArchiveProviderExtensible
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

Constructors

SelectionContactPersonExtender()

Default constructor, requesting the SelectionPerson set of features

Declaration
public SelectionContactPersonExtender()
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

SelectionContactPersonExtender(Features)

The SelectionContactPersonExtender extends a contact with persons, if at least one person-related condition has been set (this happens in the ContactPersonAsEntityExtenderBase base class, and requests the PersonExtenderBase.SelectionPerson set of features from the PersonExtenderBase.

Declaration
public SelectionContactPersonExtender(PersonExtenderBase.Features features)
Parameters
Type Name Description
PersonExtenderBase.Features features
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

SelectionContactPersonExtender(string)

The SelectionContactPersonExtender extends a contact with persons, if at least one person-related condition has been set (this happens in the ContactPersonAsEntityExtenderBase base class, and requests the PersonExtenderBase.SelectionPerson set of features from the PersonExtenderBase.

Declaration
public SelectionContactPersonExtender(string context)
Parameters
Type Name Description
string context
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

Fields

ColumnIncludePersonRestriction

The SelectionContactPersonExtender extends a contact with persons, if at least one person-related condition has been set (this happens in the ContactPersonAsEntityExtenderBase base class, and requests the PersonExtenderBase.SelectionPerson set of features from the PersonExtenderBase.

Declaration
public const string ColumnIncludePersonRestriction = "includePersonRestriction"
Field Value
Type Description
string
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

ColumnIncludePersonWithNoDM

The SelectionContactPersonExtender extends a contact with persons, if at least one person-related condition has been set (this happens in the ContactPersonAsEntityExtenderBase base class, and requests the PersonExtenderBase.SelectionPerson set of features from the PersonExtenderBase.

Declaration
public const string ColumnIncludePersonWithNoDM = "includePersonWithNoDMRestriction"
Field Value
Type Description
string
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

_colIncludePerson

The SelectionContactPersonExtender extends a contact with persons, if at least one person-related condition has been set (this happens in the ContactPersonAsEntityExtenderBase base class, and requests the PersonExtenderBase.SelectionPerson set of features from the PersonExtenderBase.

Declaration
protected ArchiveColumnInfo _colIncludePerson
Field Value
Type Description
ArchiveColumnInfo
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

_colIncludePersonWithNoDM

The SelectionContactPersonExtender extends a contact with persons, if at least one person-related condition has been set (this happens in the ContactPersonAsEntityExtenderBase base class, and requests the PersonExtenderBase.SelectionPerson set of features from the PersonExtenderBase.

Declaration
protected ArchiveColumnInfo _colIncludePersonWithNoDM
Field Value
Type Description
ArchiveColumnInfo
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

Properties

HasGenuinePersonRestrictions

Did the restrictions contain any clause that applied to the person part of the query (incluincludePersonRestriction and includePersonWithNoDMRestriction do not count as there are merely modifiers)

Declaration
public bool HasGenuinePersonRestrictions { get; }
Property Value
Type Description
bool
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

IncludePerson

What has the includePersonRestriction been set to?

Declaration
public SelectionContactPersonExtender.IncludePersonType IncludePerson { get; }
Property Value
Type Description
SelectionContactPersonExtender.IncludePersonType
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

NeedComplexPrimaryKey

Does the contact+person query need a complex (both contact AND person) key? This is true in one special, but useful, case: A search purely on contact criteria, but with the ALL option on persons. Then, we cannot either EITHER contactId OR personID, but have to use both in combination.

Declaration
public bool NeedComplexPrimaryKey { get; }
Property Value
Type Description
bool
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

SwitchEntity

Specify that entity should be person unless IncludeFirstPerson is set

Declaration
protected override bool SwitchEntity { get; }
Property Value
Type Description
bool
Overrides
ContactPersonAsEntityExtenderBase.SwitchEntity
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

SwitchNavigation

Specify that navigation should be person level

Declaration
protected override bool SwitchNavigation { get; }
Property Value
Type Description
bool
Overrides
ContactPersonAsEntityExtenderBase.SwitchNavigation
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

Methods

InnerPopulateRowFromReader(SoDataReader, ArchiveRow)

Override: Add a link hint to tell outsiders whether "genuine" person criteria were found (this triggers various behaviours, such as rowtype name)

Declaration
protected override void InnerPopulateRowFromReader(SoDataReader reader, ArchiveRow row)
Parameters
Type Name Description
SoDataReader reader
ArchiveRow row
Overrides
ContactPersonAsEntityExtenderBase.InnerPopulateRowFromReader(SoDataReader, ArchiveRow)
Remarks

This class also adds the two special kinds of processing required for a dynamic selection: a) Exclude retired persons, unless otherwise specified, and b) Include the first person, if so requested; the column includePersonRestriction is defined for that purpose here

SetJoin()

Set up the join between our person table and the parent contact. Special processing, see remarks!

Declaration
protected override PersonTableInfo SetJoin()
Returns
Type Description
PersonTableInfo
Overrides
ContactPersonExtender.SetJoin()
Remarks

Dynamic person selection restrictions are a complicated puzzle. Basically, the only user-settable restrictions are on Interests, and such restrictions should cause a narrowing of the result set (exclude contact/person rows that do not match). However, the includePersonRestriction has special behaviour - it means 'keep whatever contacts you may have, but add persons if they exist'. That implies an OUTER and not an INNER join from contact to person. Further, the includeNoDM and retired restrictions should be part of the outer join, because it would otherwise collapse into an inner join inside the database. (this is standard database behaviour - if part of the WHERE clause refers to the left-hand side of a LEFT OUTER join, the join effectively becomes an INNER join, because any restriction except IS NULL is FALSE for a NULL field - and NULL's are what you get for missing left-hand side rows).

All that can be fixed via this override of SetJoin, which sets up the outer join, puts in the special restrictions, and removes them from the RestrictionHelper, thereby avoiding having them inserted later on in the query...

SetRestriction(params ArchiveRestrictionInfo[])

Override to allow special dynamic selection behaviour of restrictions; in particular, handle the noMailings and Retired restrictions, which are modifiers rather than mapping directly to simple database file/operator/value.

Declaration
public override bool SetRestriction(params ArchiveRestrictionInfo[] restrictions)
Parameters
Type Name Description
ArchiveRestrictionInfo[] restrictions
Returns
Type Description
bool

true if this is a person-level selection

Overrides
PersonExtenderBase.SetRestriction(params ArchiveRestrictionInfo[])
Remarks

If there are any person-level restrictions, ensure that a restriction on retired (person) is present. If not, add one, set to exclude retired persons.

If the includePersonRestriction has been set to true, make this a person level query, but keep the primary key to be contact to compress away duplicate contacts generated by multiple persons.

Parallel handling of contact-level modifiers can be found in SelectionDynamicContactExtender.

Implements

IArchiveProviderQueryMapping
IArchiveExtender
IArchiveProviderDoesExtend
IArchiveProviderHasColumns
IArchiveProviderExtensible

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
ObjectExtensions.AssignByReflection<T>(T, T)
ObjectExtensions.GraphCopy<T>(T)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top