Class ProductProvider
This is the archive Provider for the Product Archive is SoAdmin.
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.BusinessLogic.dll
Syntax
[ArchiveProvider("Product", 1073741823)]
public class ProductProvider : TypedQueryProviderBase<ArchiveRow, ProductProductExtender>, IArchiveProviderQueryMapping, IArchiveQueryProvider, IArchiveProviderExtensible, IArchiveTypedProvider<ArchiveRow>, IArchiveTypedProviderBase, IArchiveProvider, IArchiveProviderHasRows, IArchiveProviderHasColumns, IArchiveProviderHasEntities
Constructors
ProductProvider()
Create the ProductProvider instance, WITHOUT contact information
Declaration
public ProductProvider()
Fields
ProviderName
This is the archive Provider for the Product Archive is SoAdmin.
Declaration
public const string ProviderName = "Product"
Field Value
| Type | Description |
|---|---|
| string |
Methods
GetEntityName(SoDataReader)
Determine the proper entity name for a raw row
Declaration
protected override string GetEntityName(SoDataReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| SoDataReader | reader | SoDataReader with the current row |
Returns
| Type | Description |
|---|---|
| string | Entity name, depending on the contents of the retired field |
Overrides
InnerMapFieldsAsync(CancellationToken)
Map fields during building of the query. We ensure the presence of the retired field in the query, needed to determine which entity a row belongs to. Depending on chosen entities, we may also add a a restriction to avoid fetching retired persons, since that entity is optional.
Declaration
public override Task InnerMapFieldsAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
Overrides
InnerPopulateRowFromReader(SoDataReader, ArchiveRow)
Populate data return rows from the reader. Since the provider is essentially just a wrapper around the PersonPersonExtender, this method does nothing.
Declaration
protected override void InnerPopulateRowFromReader(SoDataReader reader, ArchiveRow row)
Parameters
| Type | Name | Description |
|---|---|---|
| SoDataReader | reader | SoDataReader with data |
| ArchiveRow | row | Row to populate |
Overrides
SetRestriction(params ArchiveRestrictionInfo[])
Override: FindProduct providers all need to process the 'userinput' restriction, if it is set. Here we try to be sophisticated and switch to the built-in FindProduct algorithm if we see that it has been set, to reuse all that nice search code.
Declaration
public override bool SetRestriction(params ArchiveRestrictionInfo[] restrictions)
Parameters
| Type | Name | Description |
|---|---|---|
| ArchiveRestrictionInfo[] | restrictions |
Returns
| Type | Description |
|---|---|
| bool |