Show / Hide Table of Contents

Class OrderByStorage

Storage provider for order by information for Archive List providers

Inheritance
object
OrderByStorage
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public sealed class OrderByStorage
Remarks

The archive list providers need a way to store and manipulate single fields and groups of fields used for order by.

As an example, the user may request order by 'fullName' from a person provider, which actually maps to two or three fields (first/middle/last name, with field order depending on sorting preferences). In addition, if this is a dynamic, contact-oriented selection with the IncludePerson option set to First, then we should order by Rank first of all, to ensure we get the first person of each contact.

By using the concept of numbered slots that can each contain orderBy on multiple fields, this class makes such sophisticated manipulation possible.

Constructors

OrderByStorage()

Storage provider for order by information for Archive List providers

Declaration
public OrderByStorage()
Remarks

The archive list providers need a way to store and manipulate single fields and groups of fields used for order by.

As an example, the user may request order by 'fullName' from a person provider, which actually maps to two or three fields (first/middle/last name, with field order depending on sorting preferences). In addition, if this is a dynamic, contact-oriented selection with the IncludePerson option set to First, then we should order by Rank first of all, to ensure we get the first person of each contact.

By using the concept of numbered slots that can each contain orderBy on multiple fields, this class makes such sophisticated manipulation possible.

Fields

FirstSlot

Constant for 'slotNo' that will append the item to the first slot, but not before previously added items in that same slot

Declaration
public const int FirstSlot = -2147483647
Field Value
Type Description
int
Remarks

The archive list providers need a way to store and manipulate single fields and groups of fields used for order by.

As an example, the user may request order by 'fullName' from a person provider, which actually maps to two or three fields (first/middle/last name, with field order depending on sorting preferences). In addition, if this is a dynamic, contact-oriented selection with the IncludePerson option set to First, then we should order by Rank first of all, to ensure we get the first person of each contact.

By using the concept of numbered slots that can each contain orderBy on multiple fields, this class makes such sophisticated manipulation possible.

ForceFirst

Constant for 'slotNo' that will force an orderBy spec to precede all others, including previously added 'ForceFirst' orderBy items

Declaration
public const int ForceFirst = -2147483648
Field Value
Type Description
int
Remarks

The archive list providers need a way to store and manipulate single fields and groups of fields used for order by.

As an example, the user may request order by 'fullName' from a person provider, which actually maps to two or three fields (first/middle/last name, with field order depending on sorting preferences). In addition, if this is a dynamic, contact-oriented selection with the IncludePerson option set to First, then we should order by Rank first of all, to ensure we get the first person of each contact.

By using the concept of numbered slots that can each contain orderBy on multiple fields, this class makes such sophisticated manipulation possible.

ForceLast

Constant for 'slotNo' that will append the item to the last slot

Declaration
public const int ForceLast = 2147483647
Field Value
Type Description
int
Remarks

The archive list providers need a way to store and manipulate single fields and groups of fields used for order by.

As an example, the user may request order by 'fullName' from a person provider, which actually maps to two or three fields (first/middle/last name, with field order depending on sorting preferences). In addition, if this is a dynamic, contact-oriented selection with the IncludePerson option set to First, then we should order by Rank first of all, to ensure we get the first person of each contact.

By using the concept of numbered slots that can each contain orderBy on multiple fields, this class makes such sophisticated manipulation possible.

LastSlot

Constant for 'slotNo' that will append the item to the last slot

Declaration
public const int LastSlot = 2147483646
Field Value
Type Description
int
Remarks

The archive list providers need a way to store and manipulate single fields and groups of fields used for order by.

As an example, the user may request order by 'fullName' from a person provider, which actually maps to two or three fields (first/middle/last name, with field order depending on sorting preferences). In addition, if this is a dynamic, contact-oriented selection with the IncludePerson option set to First, then we should order by Rank first of all, to ensure we get the first person of each contact.

By using the concept of numbered slots that can each contain orderBy on multiple fields, this class makes such sophisticated manipulation possible.

Methods

AddOrderByFields(int, OrderBy)

Add one or more fields (one OrderBy specification) to the given slot. Create the slot if it does not already exist. See ForceFirst, ForceLasst, FirstSlot and LastSlot for constants for slot numbers, or just use an int value.

Declaration
public void AddOrderByFields(int slotNo, OrderBy orderBy)
Parameters
Type Name Description
int slotNo

Slot number

OrderBy orderBy

Content of slot

Remarks

The archive list providers need a way to store and manipulate single fields and groups of fields used for order by.

As an example, the user may request order by 'fullName' from a person provider, which actually maps to two or three fields (first/middle/last name, with field order depending on sorting preferences). In addition, if this is a dynamic, contact-oriented selection with the IncludePerson option set to First, then we should order by Rank first of all, to ensure we get the first person of each contact.

By using the concept of numbered slots that can each contain orderBy on multiple fields, this class makes such sophisticated manipulation possible.

GetFinalOrderBy()

Get a single OrderBy that reflects the sum of all slots, in slot order

Declaration
public OrderBy GetFinalOrderBy()
Returns
Type Description
OrderBy

OrderBy to be used in query

Remarks

The archive list providers need a way to store and manipulate single fields and groups of fields used for order by.

As an example, the user may request order by 'fullName' from a person provider, which actually maps to two or three fields (first/middle/last name, with field order depending on sorting preferences). In addition, if this is a dynamic, contact-oriented selection with the IncludePerson option set to First, then we should order by Rank first of all, to ensure we get the first person of each contact.

By using the concept of numbered slots that can each contain orderBy on multiple fields, this class makes such sophisticated manipulation possible.

Extension Methods

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