Class UdefExtenderBase
This is the base class for all extenders that add Udef fields to their base query. It handles all udef-related fields. Derived classes must implement the ExtenderBase.SetJoin method to join udef tables as needed to the RootQuery. Since there are two tables involved, the SetJoin implementation is different from standard; see the documentation on InnerModifyQuery() in this class for more information.
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
public abstract class UdefExtenderBase : ExtenderBase<TableInfo>, IArchiveProviderQueryMapping, IArchiveExtender, IArchiveProviderDoesExtend, IArchiveProviderHasColumns, IArchiveProviderExtensible
Constructors
UdefExtenderBase(UDefType, string)
Construct the provider, and set the udef owner type
Declaration
public UdefExtenderBase(UDefType udefType, string iconHint)
Parameters
Type | Name | Description |
---|---|---|
UDefType | udefType | The udef type to process |
string | iconHint |
Properties
MainTableName
The name of the table that this node is the handler for
Declaration
public override string MainTableName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
TableToExtend
Udef extenders cannot be easily re-extended, as they add not one but two equivalent tables.
Declaration
public override TableInfo TableToExtend { get; }
Property Value
Type | Description |
---|---|
TableInfo |
Overrides
TablesToExtend
This is the base class for all extenders that add Udef fields to their base query. It handles all udef-related fields. Derived classes must implement the ExtenderBase.SetJoin method to join udef tables as needed to the RootQuery. Since there are two tables involved, the SetJoin implementation is different from standard; see the documentation on InnerModifyQuery() in this class for more information.
Declaration
public TableInfo[] TablesToExtend { get; }
Property Value
Type | Description |
---|---|
TableInfo[] |
Methods
InnerModifyQuery()
Add/map return fields to the query; call SetJoin to obtain the contact table info instance from the derived class
Declaration
protected override void InnerModifyQuery()
Overrides
Remarks
Since there are two udef tables, but only one or none may be needed depending on the udef layout and chosen columns
InnerPopulateRowFromReader(SoDataReader, ArchiveRow)
Populate the archive row with columns according to the udef layout and desired columns
Declaration
protected override void InnerPopulateRowFromReader(SoDataReader reader, ArchiveRow row)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | Reader with data fields |
ArchiveRow | row | Row to be populated |
Overrides
IsQueryRestriction()
Override: Determine if the currently valid restriction check table (set through SetUdefJoin) has at least one restriction on it. This is not quite the same as determining whether any of our columns has a restriction, since we are interested in only the 'small' or 'large' table at this time.
Declaration
public override bool IsQueryRestriction()
Returns
Type | Description |
---|---|
bool |
Overrides
SetJoin()
Since there are two udef tables that are joined in independently of each other, the single SetJoin method defined in our base class does not fit. Instead we define a new contract where two separate SetJoin methods are used; hence the basic SetJoin is implemented here and throws an exception, since it should never be called.
Declaration
protected override TableInfo SetJoin()
Returns
Type | Description |
---|---|
TableInfo |
Overrides
Exceptions
Type | Condition |
---|---|
SoIllegalOperationException | Always thrown, this method should not be called |
SetJoinLarge()
This method is called if the large-field udef table needs to be joined in
Declaration
protected abstract TableInfo SetJoinLarge()
Returns
Type | Description |
---|---|
TableInfo | TableInfo instance of the newly joined-in large-field table |
SetJoinSmall()
This method is called if the small-field udef table needs to be joined in
Declaration
protected abstract TableInfo SetJoinSmall()
Returns
Type | Description |
---|---|
TableInfo | TableInfo instance of the newly joined-in small-field table |
SetUdefJoin(FieldInfo, FieldInfo)
Set the proper join (INNER or LEFT OUTER) depending on whether there is a restriction on a column on the particular udef table we're joining. Works by saving the table for use by our IsQueryRestriction override.
Declaration
protected void SetUdefJoin(FieldInfo parentForeignKey, FieldInfo udefPrimaryKey)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | parentForeignKey | |
FieldInfo | udefPrimaryKey |