Interface IArchiveProviderExtensible
This interface defines the extensibility property of an archive provider. Most of these methods are implemented by the standard base class IExtensibleColumnsBase. Actual functionality is found in the ExtensibleHelper class.
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
public interface IArchiveProviderExtensible
Properties
OrderBySlots
Each element of the outer list corresponds to one element of the client order by; the elements of each inner list are the actual database fields that the outer elements map to.
Declaration
OrderByStorage OrderBySlots { get; }
Property Value
Type | Description |
---|---|
OrderByStorage |
Remarks
Translation/mapping from column names into database fields is done by the various extenders and providers involved in a query. However, while these work independently of each other, a global ordering has to be maintained so that the first orderby column specified by the client becomes the first (list of) orderby field(s), even if the module responsible for translating them is not the first one to process the orderby. Therefore, the outer provider needs to maintain this list, pre-allocating it with the correct number of slots.
Each inner provider can then add its mapping, using a syntax similar to the following:int slot = 0;
foreach( ArchiveOrderByInfo info in _orderBy )
{
if( HasColumn( info.Name ) ) // are we the ones to handle this orderby column?
OrderBySlots[slot] = MapOrderBy( info ); // column name -> database field translation
++slot;
}
The outer provider is then responsible for assembling the complete list of lists. The end result is to ensure that actual
sorting corresponds to what was requested regardless of internal provider structure.
RootQuery
Returns the root query of the provider chain, so that extenders can modify it by adding their own tables
Declaration
ArchiveSelect RootQuery { get; }
Property Value
Type | Description |
---|---|
ArchiveSelect |
TableToExtend
Returns the tableinfo that describes the main table of the current provider (if the current provider is an extender, this is usually not the root table of the entire query). This is the table that extenders to this provider should latch onto.
Declaration
TableInfo TableToExtend { get; }
Property Value
Type | Description |
---|---|
TableInfo |
Methods
AddExtensionProvider(IArchiveExtender)
Add an additional provider who will extend existing rows with new columns
Declaration
void AddExtensionProvider(IArchiveExtender subProvider)
Parameters
Type | Name | Description |
---|---|---|
IArchiveExtender | subProvider | Provider to be called by this provider |
GetExtensionProviders()
Enumerate the providers that are extenders of this provider, making it possible to recursively enumerate the whole tree
Declaration
IEnumerable<IArchiveExtender> GetExtensionProviders()
Returns
Type | Description |
---|---|
IEnumerable<IArchiveExtender> |