Show / Hide Table of Contents

Class SelectionCollection

Selection tab

Collection of Selection. Each element of the collection represents one entity based on Selection.
Inheritance
Object
NestedPersist
NestedPersistFacade
NestedCollectionPersist
EntityCollectionBase
SelectionCollection
Implements
INestedPersist
IEnumerable<INestedPersist>
ISoCollection
IList
ICollection
IEnumerable
INotifyCollectionChanged
IBindingList
Inherited Members
EntityCollectionBase._innerList
EntityCollectionBase.Delete()
EntityCollectionBase.GetEnumerator()
EntityCollectionBase.Add(EntityBase)
EntityCollectionBase.ISoCollection.Add(ISoItem)
EntityCollectionBase.ISoCollection.AddNew()
EntityCollectionBase.Remove(EntityBase)
EntityCollectionBase.IList.get_Item(Int32)
EntityCollectionBase.IList.set_Item(Int32, Object)
EntityCollectionBase.CopyTo(Array, Int32)
EntityCollectionBase.IList.Add(Object)
EntityCollectionBase.IList.Remove(Object)
EntityCollectionBase.IndexOf(Object)
EntityCollectionBase.Contains(Object)
EntityCollectionBase.IList.Clear()
EntityCollectionBase.IList.Insert(Int32, Object)
EntityCollectionBase.IList.RemoveAt(Int32)
EntityCollectionBase.AddIndex(PropertyDescriptor)
EntityCollectionBase.ApplySort(PropertyDescriptor, ListSortDirection)
EntityCollectionBase.Find(PropertyDescriptor, Object)
EntityCollectionBase.RemoveIndex(PropertyDescriptor)
EntityCollectionBase.RemoveSort()
EntityCollectionBase.IsDirty
EntityCollectionBase.Count
EntityCollectionBase.IList.Item[Int32]
EntityCollectionBase.ICollection.Count
EntityCollectionBase.IsFixedSize
EntityCollectionBase.IsReadOnly
EntityCollectionBase.ICollection.IsSynchronized
EntityCollectionBase.ICollection.SyncRoot
EntityCollectionBase.AllowEdit
EntityCollectionBase.AllowNew
EntityCollectionBase.AllowRemove
EntityCollectionBase.IsSorted
EntityCollectionBase.SortDirection
EntityCollectionBase.SortProperty
EntityCollectionBase.SupportsChangeNotification
EntityCollectionBase.SupportsSearching
EntityCollectionBase.SupportsSorting
EntityCollectionBase.CollectionChanged
EntityCollectionBase.ListChanged
NestedCollectionPersist.GetFacadingItems()
NestedCollectionPersist.IEnumerable<INestedPersist>.GetEnumerator()
NestedCollectionPersist.IsDeleted
NestedPersistFacade.OnPreIdUpdate()
NestedPersistFacade.OnPrimaryKeyRequest(PKContainer)
NestedPersistFacade.OnPrimaryKeyUpdate(PKContainer)
NestedPersistFacade.OnIdUpdate()
NestedPersistFacade.OnSave(BatchSave)
NestedPersistFacade.OnSaved(Boolean)
NestedPersist._saveOwner
NestedPersist._isSaving
NestedPersist.SetSaveOwner(INestedPersist)
NestedPersist.Save()
NestedPersist.INestedPersist.OnPreIdUpdate()
NestedPersist.INestedPersist.OnPrimaryKeyRequest(PKContainer)
NestedPersist.INestedPersist.OnPrimaryKeyUpdate(PKContainer)
NestedPersist.INestedPersist.OnIdUpdate()
NestedPersist.INestedPersist.OnSave(BatchSave)
NestedPersist.INestedPersist.OnSaved(Boolean)
NestedPersist.IsSaving
NestedPersist.IsMarkedForDelete
NestedPersist.OnElementSaved
NestedPersist.OnElementIdUpdate
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Entities
Assembly: SoDataBase.dll
Syntax
public class SelectionCollection : EntityCollectionBase, INestedPersist, IEnumerable<INestedPersist>, ISoCollection, IList, ICollection, IEnumerable, ITableRowLoadHandlerFactory, INotifyCollectionChanged, IBindingList
Remarks

Entity collections can be created in several ways.

  • Use the static CreateNew() method to create a new, empty collection. You can then add objects of type to it, and use methods like to operate on the whole collection.
  • You can create a (nested) SelectionCollection SelectionCollection.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(SelectionCollection.CustomSearch) method to apply the query to the database and obtain the result as an EntityCollection object, with one item for each table row that matched your query.
  • For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
Unique indexes are handled through the Selection object directly, which has nested classes and GetFromIdx methods for each unique index.

Unique indexes on table Selection are:

Index fieldsNested index class name
SelectionIdSelectionId:

Primary key

Nested index class: Selection.IdxSelectionId

Static Get method: GetFromIdxSelectionId(Int32)

Non-unique indexes on table Selection are:
Index fieldsNested index class name
NameName:

Selection name, freetext indexed

Nested index class: SelectionCollection.IdxName

Static Get method: GetFromIdxName(String)

AssociateIdAssociateId:

Can also represent other types of owner

Nested index class: SelectionCollection.IdxAssociateId

Static Get method: GetFromIdxAssociateId(Int32)

SoundExSoundEx:

What the name sounds like, for duplicate detection

Nested index class: SelectionCollection.IdxSoundEx

Static Get method: GetFromIdxSoundEx(String)

GroupIdxGroupIdx:

Link to group

Nested index class: SelectionCollection.IdxGroupIdx

Static Get method: GetFromIdxGroupIdx(Int32)

SourceSource:

How did we get this selection? For future integration needs

Nested index class: SelectionCollection.IdxSource

Static Get method: GetFromIdxSource(Int16)

Constructors

SelectionCollection(SelectionCollection.SelectionCollectionIdx)

Constructor for class SelectionCollection.
This object represents a collection of rows in table 'selection'. Table contact: Selections

Declaration
protected SelectionCollection(SelectionCollection.SelectionCollectionIdx idx)
Parameters
Type Name Description
SelectionCollection.SelectionCollectionIdx idx

Fields

_idx

Fetcher class the collection is based on

Declaration
protected SelectionCollection.SelectionCollectionIdx _idx
Field Value
Type Description
SelectionCollection.SelectionCollectionIdx

_rows

Row objects that the collection is based on.

Declaration
protected SelectionRows _rows
Field Value
Type Description
SelectionRows

Properties

Index

Retrieve the index for SelectionCollection

Declaration
public SelectionCollection.SelectionCollectionIdx Index { get; }
Property Value
Type Description
SelectionCollection.SelectionCollectionIdx

Item[Int32]

Get a Selection from the collection from its zero-based index.

Declaration
public Selection this[int index] { get; }
Parameters
Type Name Description
Int32 index

Zero-based index in the collection.

Property Value
Type Description
Selection

Rows

The ecapsulated object SelectionRows.

Declaration
public SelectionRows Rows { get; }
Property Value
Type Description
SelectionRows

Sentries

The collection of sentries that are guarding this collection of rows. This collection is used by RDB entities which return HDB collections.

For example, the contact.Faxes returns a PhoneRows collection in which each row will need to check the contact's sentry for permission to read/write their field

Declaration
public override SentryCollection Sentries { get; }
Property Value
Type Description
SentryCollection
Overrides
EntityCollectionBase.Sentries

Methods

Add(Selection)

Add one Selection to the collection.

Declaration
public int Add(Selection selection)
Parameters
Type Name Description
Selection selection

An instance of Selection to be added to the collection.

Returns
Type Description
Int32

The index of the added Selection.

AddNew()

Get a new instance of Selection added to the collection.

Declaration
public Selection AddNew()
Returns
Type Description
Selection

A new instance of Selection added to the collection.

CreateChild()

Create a new instance of Selection

Declaration
protected override EntityBase CreateChild()
Returns
Type Description
EntityBase

New instance of Selection

Overrides
EntityCollectionBase.CreateChild()

CreateNew()

Create a new instance of the SelectionCollection.

Declaration
public static SelectionCollection CreateNew()
Returns
Type Description
SelectionCollection

A new instance of the SelectionCollection.

GetFromCustomSearch(SelectionCollection.CustomSearch)

Create a new instance of the SelectionCollection object, and populate it with data from a custom search. If the search returns no results, an empty collection will be returned; if the result contains rows, a collection of SelectionRow objects representing each row will be returned.

Declaration
public static SelectionCollection GetFromCustomSearch(SelectionCollection.CustomSearch query)
Parameters
Type Name Description
SelectionCollection.CustomSearch query

The custom search to execute against the database

Returns
Type Description
SelectionCollection

A new instance of the SelectionCollection object, reflecting the result of the query.

GetFromIdxAssociateId(Int32)

Create a new instance of the SelectionRows object, and populate it with SelectionRow objects based on the result of a query on the table Selection. This method is intended to make it easy to use efficient queries that match a database index.

Declaration
public static SelectionCollection GetFromIdxAssociateId(int associateId)
Parameters
Type Name Description
Int32 associateId

Can also represent other types of owner

Returns
Type Description
SelectionCollection

New SelectionRows collection containing the result of the index query. If no rows matched, the collection will be empty.

Remarks

The query matches the fields on the non-unique index IDXSelAssoc_id. Unique indexes have corresponding Create methods directly on the SelectionRow object, since such indexes always return zero or one rows.

GetFromIdxGroupIdx(Int32)

Create a new instance of the SelectionRows object, and populate it with SelectionRow objects based on the result of a query on the table Selection. This method is intended to make it easy to use efficient queries that match a database index.

Declaration
public static SelectionCollection GetFromIdxGroupIdx(int groupIdx)
Parameters
Type Name Description
Int32 groupIdx

Link to group

Returns
Type Description
SelectionCollection

New SelectionRows collection containing the result of the index query. If no rows matched, the collection will be empty.

Remarks

The query matches the fields on the non-unique index IDXSelGrp_idx. Unique indexes have corresponding Create methods directly on the SelectionRow object, since such indexes always return zero or one rows.

GetFromIdxName(String)

Create a new instance of the SelectionRows object, and populate it with SelectionRow objects based on the result of a query on the table Selection. This method is intended to make it easy to use efficient queries that match a database index.

Declaration
public static SelectionCollection GetFromIdxName(string name)
Parameters
Type Name Description
String name

Selection name, freetext indexed

Returns
Type Description
SelectionCollection

New SelectionRows collection containing the result of the index query. If no rows matched, the collection will be empty.

Remarks

The query matches the fields on the non-unique index IDXSelName. Unique indexes have corresponding Create methods directly on the SelectionRow object, since such indexes always return zero or one rows.

GetFromIdxSoundEx(String)

Create a new instance of the SelectionRows object, and populate it with SelectionRow objects based on the result of a query on the table Selection. This method is intended to make it easy to use efficient queries that match a database index.

Declaration
public static SelectionCollection GetFromIdxSoundEx(string soundEx)
Parameters
Type Name Description
String soundEx

What the name sounds like, for duplicate detection

Returns
Type Description
SelectionCollection

New SelectionRows collection containing the result of the index query. If no rows matched, the collection will be empty.

Remarks

The query matches the fields on the non-unique index IDXSelSoundEx. Unique indexes have corresponding Create methods directly on the SelectionRow object, since such indexes always return zero or one rows.

GetFromIdxSource(Int16)

Create a new instance of the SelectionRows object, and populate it with SelectionRow objects based on the result of a query on the table Selection. This method is intended to make it easy to use efficient queries that match a database index.

Declaration
public static SelectionCollection GetFromIdxSource(short source)
Parameters
Type Name Description
Int16 source

How did we get this selection? For future integration needs

Returns
Type Description
SelectionCollection

New SelectionRows collection containing the result of the index query. If no rows matched, the collection will be empty.

Remarks

The query matches the fields on the non-unique index IDXSelSource. Unique indexes have corresponding Create methods directly on the SelectionRow object, since such indexes always return zero or one rows.

Remove(Selection)

Removes the given Selection from the collection

Declaration
public void Remove(Selection selection)
Parameters
Type Name Description
Selection selection

the Selection to be removed

ToArray()

Declaration
public Selection[] ToArray()
Returns
Type Description
Selection[]

ToString()

For debugging: Number of members, and the first (up to) 5 items

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()

Implements

INestedPersist
System.Collections.Generic.IEnumerable<T>
ISoCollection
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
System.Collections.Specialized.INotifyCollectionChanged
System.ComponentModel.IBindingList

Extension Methods

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