Show / Hide Table of Contents

Class SentryQueryInfo<TMainTable>

Class holding TableInfos on behalf of a Sentry implementation. Subclasses contain 'typed' tableinfos (as properties/fields) and 'untyped' tableinfos in an array.

Inheritance
Object
SentryQueryInfo
SentryQueryInfo<TMainTable>
AppointmentSentryQueryInfo
AssociateSentryQueryInfo
ContactSentryQueryInfo
DashboardSentryQueryInfo
DashboardTileSentryQueryInfo
DocDocumentSentryQueryInfo
HierarchySentryQueryInfo
KbEntrySentryQueryInfo
PersonSentry.PersonSentryQueryInfo
ProjectSentryQueryInfo
QuoteAlternativeSentryQueryInfo
QuoteLineSentryQueryInfo
QuoteSentryQueryInfo
QuoteVersionSentryQueryInfo
RelationsSentryQueryInfo
ReplyTemplateSentryQueryInfo
SaleSentryQueryInfo
SatelliteSentryQueryInfo
SelectionSentryQueryInfo
SORPublishSentryQueryInfo
TargetAssignmentInfoSentryQueryInfo
TicketSentryQueryInfo
UDefFieldQueryInfo
WorkflowSentryQueryInfo
Implements
IEnumerable<TableInfo>
IEnumerable
Namespace: SuperOffice.CRM.Security
Assembly: SoDataBase.dll
Syntax
public abstract class SentryQueryInfo<TMainTable> : SentryQueryInfo, IEnumerable<TableInfo>, IEnumerable where TMainTable : TableInfo
Type Parameters
Name Description
TMainTable

Kind of main TableInfo for the Sentry.

Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

Constructors

SentryQueryInfo(TMainTable, Boolean)

Constructors called by implementations, providing the main TableInfo.

Declaration
protected SentryQueryInfo(TMainTable mainTable, bool hasVisibleFor)
Parameters
Type Name Description
TMainTable mainTable

Main TableInfo for the query.

Boolean hasVisibleFor

Do we care about visible for table?

Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

Properties

HasVisibleFor

Does this table have VisibleFor?

Declaration
public override bool HasVisibleFor { get; }
Property Value
Type Description
Boolean
Overrides
SentryQueryInfo.HasVisibleFor
Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

MainTable

Main table for the sentry.

Declaration
public TMainTable MainTable { get; }
Property Value
Type Description
TMainTable
Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

ParentFields

Get the field thayt

Declaration
public override FieldInfo[] ParentFields { get; }
Property Value
Type Description
FieldInfo[]
Overrides
SentryQueryInfo.ParentFields
Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

VisibleForTableInfo

Table info for the related VisibleFor table.

Declaration
public override VisibleForTableInfo VisibleForTableInfo { get; }
Property Value
Type Description
VisibleForTableInfo
Overrides
SentryQueryInfo.VisibleForTableInfo
Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

Methods

AnalyzeQuery(PrivateSelect)

Update TableInfos held by a sentry with the right instances based on a Select statement.

Declaration
public override void AnalyzeQuery(PrivateSelect sql)
Parameters
Type Name Description
PrivateSelect sql

Select statement to base the lookup on.

Overrides
SentryQueryInfo.AnalyzeQuery(PrivateSelect)
Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

CanCoverTable(TableInfo)

Check if this is a table that can be covered. If so, add it to the list of covered tables.

Declaration
public override bool CanCoverTable(TableInfo table)
Parameters
Type Name Description
TableInfo table

Information about the table to analyze.

Returns
Type Description
Boolean

True if this now is a table that can be covered.

Overrides
SentryQueryInfo.CanCoverTable(TableInfo)
Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

GetEnumerator()

Enumerator looping over all the covered tables for a sentry.

Declaration
public override IEnumerator<TableInfo> GetEnumerator()
Returns
Type Description
IEnumerator<TableInfo>

Enumerator looping over all the covered tables for a sentry.

Overrides
SentryQueryInfo.GetEnumerator()
Remarks

The first item returned is always the MainTable.

GetOwnerTableCandidates()

Class holding TableInfos on behalf of a Sentry implementation. Subclasses contain 'typed' tableinfos (as properties/fields) and 'untyped' tableinfos in an array.

Declaration
protected abstract TableInfo[] GetOwnerTableCandidates()
Returns
Type Description
TableInfo[]
Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

GetTypedMembers()

Method that can be overridden to return additional typed instances of covered TableInfos. The default implementation returns an empty array.

Declaration
protected virtual TableInfo[] GetTypedMembers()
Returns
Type Description
TableInfo[]

Array of typed TableInfos covered by the Sentry.

Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

GetUntypedMembers()

Abstract member that needs to be implemented by the base classes to expose TableInfos covered by the sentry that is not exposed by the MainTable or GetTypedMembers().

Declaration
protected abstract TableInfo[] GetUntypedMembers()
Returns
Type Description
TableInfo[]

Array of untyped TableInfos covered by the Sentry.

Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

ReplaceRelatedTableInstance(TableInfo, TableInfo, TableInfo[])

Class holding TableInfos on behalf of a Sentry implementation. Subclasses contain 'typed' tableinfos (as properties/fields) and 'untyped' tableinfos in an array.

Declaration
protected void ReplaceRelatedTableInstance(TableInfo original, TableInfo replacement, TableInfo[] collectionToWorkOn)
Parameters
Type Name Description
TableInfo original
TableInfo replacement
TableInfo[] collectionToWorkOn
Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

UpdateRelatedTableInfo<T>(PrivateSelect, ref T)

Update a TableInfo to the instance of the appropriate related table.

Declaration
protected void UpdateRelatedTableInfo<T>(PrivateSelect sql, ref T relatedTableInfo)
    where T : TableInfo
Parameters
Type Name Description
PrivateSelect sql

The Select statement to analyze.

T relatedTableInfo

Related TableInfo to update.

Type Parameters
Name Description
T

Type of TableInfo to update.

Remarks

Each sentry holds an implementation of this class to deal with tables covered by the sentry.

UpdateTypedMembers(PrivateSelect)

Method called by the base class to force the implementation to update typed instances of TableInfo.

Declaration
protected virtual void UpdateTypedMembers(PrivateSelect sql)
Parameters
Type Name Description
PrivateSelect sql

Query to use when updating the TableInfos.

Remarks

Implementations should use UpdateRelatedTableInfo<T>(PrivateSelect, ref T) when updating the TableInfo.

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods

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