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()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.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()

Declaration
public OrderByStorage()

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
Int32

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
Int32

ForceLast

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

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

LastSlot

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

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

Methods

AddOrderByFields(Int32, OrderBy)

Add one or more fields (one OrderBy specification) to the given slot. Create the slot if it does not already exist. See ForceFirst, , 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
Int32 slotNo

Slot number

OrderBy orderBy

Content of slot

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

Extension Methods

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