Show / Hide Table of Contents

Class ProjectCollection

Projects

Collection of Project. Each element of the collection represents one entity based on Project.
Inheritance
Object
NestedPersist
NestedPersistFacade
NestedCollectionPersist
EntityCollectionBase
ProjectCollection
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 ProjectCollection : 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) ProjectCollection ProjectCollection.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(ProjectCollection.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 Project object directly, which has nested classes and GetFromIdx methods for each unique index.

Unique indexes on table Project are:

Index fieldsNested index class name
ProjectIdProjectId:

Primary key

Nested index class: Project.IdxProjectId

Static Get method: GetFromIdxProjectId(Int32)

Non-unique indexes on table Project are:
Index fieldsNested index class name
SoundExSoundEx:

What the name sounds like, for duplicate detection

Nested index class: ProjectCollection.IdxSoundEx

Static Get method: GetFromIdxSoundEx(String)

SourceSource:

How did we get this project? For future integration needs

Nested index class: ProjectCollection.IdxSource

Static Get method: GetFromIdxSource(Int16)

ProjectNumberProjectNumber:

Automatically generated number

Nested index class: ProjectCollection.IdxProjectNumber

Static Get method: GetFromIdxProjectNumber(String)

Userdef2IdUserdef2Id:

User-defined table record 2

Nested index class: ProjectCollection.IdxUserdef2Id

Static Get method: GetFromIdxUserdef2Id(Int32)

NameName:

Project name

Nested index class: ProjectCollection.IdxName

Static Get method: GetFromIdxName(String)

Constructors

ProjectCollection(ProjectCollection.ProjectCollectionIdx)

Constructor for class ProjectCollection.
This object represents a collection of rows in table 'project'. Table contact: Projects

Declaration
protected ProjectCollection(ProjectCollection.ProjectCollectionIdx idx)
Parameters
Type Name Description
ProjectCollection.ProjectCollectionIdx idx

Fields

_idx

Fetcher class the collection is based on

Declaration
protected ProjectCollection.ProjectCollectionIdx _idx
Field Value
Type Description
ProjectCollection.ProjectCollectionIdx

_rows

Row objects that the collection is based on.

Declaration
protected ProjectRows _rows
Field Value
Type Description
ProjectRows

Properties

Index

Retrieve the index for ProjectCollection

Declaration
public ProjectCollection.ProjectCollectionIdx Index { get; }
Property Value
Type Description
ProjectCollection.ProjectCollectionIdx

Item[Int32]

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

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

Zero-based index in the collection.

Property Value
Type Description
Project

Rows

The ecapsulated object ProjectRows.

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

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(Project)

Add one Project to the collection.

Declaration
public int Add(Project project)
Parameters
Type Name Description
Project project

An instance of Project to be added to the collection.

Returns
Type Description
Int32

The index of the added Project.

AddNew()

Get a new instance of Project added to the collection.

Declaration
public Project AddNew()
Returns
Type Description
Project

A new instance of Project added to the collection.

CreateChild()

Create a new instance of Project

Declaration
protected override EntityBase CreateChild()
Returns
Type Description
EntityBase

New instance of Project

Overrides
EntityCollectionBase.CreateChild()

CreateNew()

Create a new instance of the ProjectCollection.

Declaration
public static ProjectCollection CreateNew()
Returns
Type Description
ProjectCollection

A new instance of the ProjectCollection.

GetFromCustomSearch(ProjectCollection.CustomSearch)

Create a new instance of the ProjectCollection 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 ProjectRow objects representing each row will be returned.

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

The custom search to execute against the database

Returns
Type Description
ProjectCollection

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

GetFromIdxName(String)

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

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

Project name

Returns
Type Description
ProjectCollection

New ProjectRows 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 IDXProjName. Unique indexes have corresponding Create methods directly on the ProjectRow object, since such indexes always return zero or one rows.

GetFromIdxProjectNumber(String)

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

Declaration
public static ProjectCollection GetFromIdxProjectNumber(string projectNumber)
Parameters
Type Name Description
String projectNumber

Automatically generated number

Returns
Type Description
ProjectCollection

New ProjectRows 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 IDXProjPnum. Unique indexes have corresponding Create methods directly on the ProjectRow object, since such indexes always return zero or one rows.

GetFromIdxSoundEx(String)

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

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

What the name sounds like, for duplicate detection

Returns
Type Description
ProjectCollection

New ProjectRows 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 IDXProjSoundEx. Unique indexes have corresponding Create methods directly on the ProjectRow object, since such indexes always return zero or one rows.

GetFromIdxSource(Int16)

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

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

How did we get this project? For future integration needs

Returns
Type Description
ProjectCollection

New ProjectRows 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 IDXProjSource. Unique indexes have corresponding Create methods directly on the ProjectRow object, since such indexes always return zero or one rows.

GetFromIdxUserdef2Id(Int32)

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

Declaration
public static ProjectCollection GetFromIdxUserdef2Id(int userdef2Id)
Parameters
Type Name Description
Int32 userdef2Id

User-defined table record 2

Returns
Type Description
ProjectCollection

New ProjectRows 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 IDXProjUdef2_id. Unique indexes have corresponding Create methods directly on the ProjectRow object, since such indexes always return zero or one rows.

Remove(Project)

Removes the given Project from the collection

Declaration
public void Remove(Project project)
Parameters
Type Name Description
Project project

the Project to be removed

ToArray()

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

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