Class TypedQueryProviderBase<RowType, RootExtender>
Base class for single-query providers that have strongly typed archive rows. It contains declarations and methods to set up one main extender, get the standard column names from the row type, and set standard entity-based navigation hints if no other hints have been set.
Implements
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
public abstract class TypedQueryProviderBase<RowType, RootExtender> : QueryProviderBase<RowType>, IArchiveProviderQueryMapping, IArchiveQueryProvider, IArchiveProviderExtensible, IArchiveTypedProvider<RowType>, IArchiveTypedProviderBase, IArchiveProvider, IArchiveProviderHasRows, IArchiveProviderHasColumns, IArchiveProviderHasEntities where RowType : ArchiveRow, new() where RootExtender : IArchiveExtender, new()
Type Parameters
Name | Description |
---|---|
RowType | Type of archive row to return |
RootExtender | Type of the extender that is the root extender of the provider |
Constructors
TypedQueryProviderBase()
Create the provider, create the Select, instantiate the root extender. No entities are registered!
Declaration
protected TypedQueryProviderBase()
TypedQueryProviderBase(ArchiveRowTypeInfo)
Create the provider, create the Select, instantiate the root extender and register the main entity
Declaration
protected TypedQueryProviderBase(ArchiveRowTypeInfo entity)
Parameters
Type | Name | Description |
---|---|---|
ArchiveRowTypeInfo | entity | Main entity of provider. If this is null, then this is assumed to be a fully dynamic provider, and all extender- and entity-related processing is postponed or skipped |
TypedQueryProviderBase(ArchiveRowTypeInfo, RootExtender)
Create the provider, create the Select, instantiate the root extender and register the main entity
Declaration
protected TypedQueryProviderBase(ArchiveRowTypeInfo entity, RootExtender rootExtender)
Parameters
Type | Name | Description |
---|---|---|
ArchiveRowTypeInfo | entity | Main entity of provider |
RootExtender | rootExtender | Extender (already instantiated, but not initialized with parent & prefix) |
Properties
BaseExtender
Get the root extender of the provider
Declaration
protected RootExtender BaseExtender { get; }
Property Value
Type | Description |
---|---|
RootExtender |
PrimaryTable
Get the table of the root extender
Declaration
public override TableInfo PrimaryTable { get; }
Property Value
Type | Description |
---|---|
TableInfo |
Overrides
ProviderNameFromAttribute
Get the provider name, based on the compile-time ArchiveProviderAttribute set on the subclass
Declaration
protected string ProviderNameFromAttribute { get; }
Property Value
Type | Description |
---|---|
string |
Query
Get the root query
Declaration
public override ArchiveSelect Query { get; }
Property Value
Type | Description |
---|---|
ArchiveSelect |
Overrides
RootExtenders
Implement this property to return the extender(s) that form the root of the query tree, or null if that is not meaningful. This property is used by the dynamic column processing, which will fail and throw an exception if null is returned here (no problem if dynamic column syntax is not used)
Declaration
protected override List<IArchiveExtender> RootExtenders { get; }
Property Value
Type | Description |
---|---|
List<IArchiveExtender> |
Overrides
Methods
GetRows(string)
Get the rows, as strongly typed elements
Declaration
public virtual IEnumerable<RowType> GetRows(string options)
Parameters
Type | Name | Description |
---|---|---|
string | options |
Returns
Type | Description |
---|---|
IEnumerable<RowType> |
GetStandardColumnNames()
Get the standard column names from the Archive row type
Declaration
public string[] GetStandardColumnNames()
Returns
Type | Description |
---|---|
string[] |
HandleDynamicExtenders(IArchiveExtender)
Base class for single-query providers that have strongly typed archive rows. It contains declarations and methods to set up one main extender, get the standard column names from the row type, and set standard entity-based navigation hints if no other hints have been set.
Declaration
protected override void HandleDynamicExtenders(IArchiveExtender dynamicTree)
Parameters
Type | Name | Description |
---|---|---|
IArchiveExtender | dynamicTree |
Overrides
InnerPopulateRowFromReader(SoDataReader, ArchiveRow)
Override: If no-one in the subclass has set the link hint up to now, then do so, using the row entity name and primary key
Declaration
protected override void InnerPopulateRowFromReader(SoDataReader reader, ArchiveRow row)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | |
ArchiveRow | row |
Overrides
SetAdditionalColumns(params string[])
Set additional return columns (the standard columns are always included)
Declaration
public void SetAdditionalColumns(params string[] additionalColumns)
Parameters
Type | Name | Description |
---|---|---|
string[] | additionalColumns |