Class TableRowsBase
Summary description for TableCollectionBase.
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public abstract class TableRowsBase : NestedCollectionPersist, INestedPersist, IEnumerable<INestedPersist>, INotifyCollectionChanged, IBindingList, IList, ICollection, IEnumerable
Constructors
TableRowsBase(IdxBase)
Default constructor for the class.
Declaration
protected TableRowsBase(IdxBase idx)
Parameters
| Type | Name | Description |
|---|---|---|
| IdxBase | idx | Index to be used for loading the object from the database. |
Fields
_allHasBeenMarkedForDelete
Summary description for TableCollectionBase.
Declaration
protected bool _allHasBeenMarkedForDelete
Field Value
| Type | Description |
|---|---|
| bool |
_idx
Reference to the index used to load the object from the database
Declaration
protected IdxBase _idx
Field Value
| Type | Description |
|---|---|
| IdxBase |
_innerList
Inner list for rows.
Declaration
protected ArrayList _innerList
Field Value
| Type | Description |
|---|---|
| ArrayList |
_sentries
Summary description for TableCollectionBase.
Declaration
protected SentryCollection _sentries
Field Value
| Type | Description |
|---|---|
| SentryCollection |
Properties
AllowEdit
Summary description for TableCollectionBase.
Declaration
public bool AllowEdit { get; }
Property Value
| Type | Description |
|---|---|
| bool |
AllowNew
Summary description for TableCollectionBase.
Declaration
public bool AllowNew { get; }
Property Value
| Type | Description |
|---|---|
| bool |
AllowRemove
Summary description for TableCollectionBase.
Declaration
public bool AllowRemove { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Count
The number of rows in the collection.
Declaration
public override int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
Overrides
Index
The index used to load the collection.
Declaration
public IdxBase Index { get; }
Property Value
| Type | Description |
|---|---|
| IdxBase |
IsDirty
Is the collection dirty, true if any of the elements of the collection is dirty.
Declaration
public override bool IsDirty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
IsFixedSize
A collection with a fixed size does not allow the addition or removal of elements after the collection is created, but it allows the modification of existing elements.
Declaration
public bool IsFixedSize { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsMarkedForDelete
Gets or sets a flag for every row in the collection to be marked for deletion.
Declaration
public override bool IsMarkedForDelete { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
IsReadOnly
A collection that is read-only does not allow the addition, removal, or modification of elements after the collection is created.
Declaration
public bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsSorted
Summary description for TableCollectionBase.
Declaration
public bool IsSorted { get; }
Property Value
| Type | Description |
|---|---|
| bool |
this[int]
Summary description for TableCollectionBase.
Declaration
public TableRowBase this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Property Value
| Type | Description |
|---|---|
| TableRowBase |
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 SentryCollection Sentries { get; }
Property Value
| Type | Description |
|---|---|
| SentryCollection |
SortDirection
Summary description for TableCollectionBase.
Declaration
public ListSortDirection SortDirection { get; }
Property Value
| Type | Description |
|---|---|
| ListSortDirection |
SortProperty
Summary description for TableCollectionBase.
Declaration
public PropertyDescriptor SortProperty { get; }
Property Value
| Type | Description |
|---|---|
| PropertyDescriptor |
SupportsChangeNotification
Summary description for TableCollectionBase.
Declaration
public bool SupportsChangeNotification { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsSearching
Summary description for TableCollectionBase.
Declaration
public bool SupportsSearching { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsSorting
Summary description for TableCollectionBase.
Declaration
public bool SupportsSorting { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
Add(TableRowBase)
Add one row to the collection.
Declaration
protected virtual int Add(TableRowBase row)
Parameters
| Type | Name | Description |
|---|---|---|
| TableRowBase | row | An instance of row to be added to the collection. |
Returns
| Type | Description |
|---|---|
| int | The index of the added row. |
AddIndex(PropertyDescriptor)
Summary description for TableCollectionBase.
Declaration
public void AddIndex(PropertyDescriptor property)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyDescriptor | property |
AddNew()
Summary description for TableCollectionBase.
Declaration
public virtual TableRowBase AddNew()
Returns
| Type | Description |
|---|---|
| TableRowBase |
ApplySort(PropertyDescriptor, ListSortDirection)
Summary description for TableCollectionBase.
Declaration
public void ApplySort(PropertyDescriptor property, ListSortDirection direction)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyDescriptor | property | |
| ListSortDirection | direction |
Clear()
Clears the collection; no rows are saved, deleted or otherwise manipulated - they are simply dropped from the collection
Declaration
public virtual void Clear()
Contains(object)
Checks if the list contains the object or not. Implemented in classes inheriting TableRowBase. Contains(object)
Declaration
public bool Contains(object o)
Parameters
| Type | Name | Description |
|---|---|---|
| object | o | The object to locate in the Array. |
Returns
| Type | Description |
|---|---|
| bool | True if value is found in the Array; otherwise, False |
CopyTo(Array, int)
Convert collection into an array (array must already be allocated) CopyTo(Array, int)
Declaration
public void CopyTo(Array list, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | list | |
| int | index |
CreateChild()
Create a child element for the collection.
Declaration
protected abstract TableRowBase CreateChild()
Returns
| Type | Description |
|---|---|
| TableRowBase | Returns a new instance of a row for the collection |
DeleteAsync()
Delete all contained objects.
Declaration
public virtual Task DeleteAsync()
Returns
| Type | Description |
|---|---|
| Task |
Find(PropertyDescriptor, object)
Summary description for TableCollectionBase.
Declaration
public int Find(PropertyDescriptor property, object key)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyDescriptor | property | |
| object | key |
Returns
| Type | Description |
|---|---|
| int |
GetEnumerator()
Retrieve an enumerator for enumerating over the collection.
Declaration
public override IEnumerator GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator | object implementing the interface IEnumerator. |
Overrides
GetPrimaryKeys()
Get an array containing the primary keys of this collection of table rows
Declaration
public int[] GetPrimaryKeys()
Returns
| Type | Description |
|---|---|
| int[] | Array of 0 or more elements |
IndexOf(object)
Returns the object at the given index. Implemented in classes inheriting TableRowBase. IndexOf(object)
Declaration
public int IndexOf(object o)
Parameters
| Type | Name | Description |
|---|---|---|
| object | o | The object |
Returns
| Type | Description |
|---|---|
| int | The index of the object. |
Load(IdxBase)
Summary description for TableCollectionBase.
Declaration
protected void Load(IdxBase idx)
Parameters
| Type | Name | Description |
|---|---|---|
| IdxBase | idx |
LoadAsync(IdxBase, CancellationToken)
Summary description for TableCollectionBase.
Declaration
[CreateSyncVersion(OmitNullableDirective = true)]
protected Task LoadAsync(IdxBase idx, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IdxBase | idx | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
OnAdded(object, int)
Method called whenever a row is added to the collection
Declaration
protected virtual void OnAdded(object value, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | The object added to the collection. |
| int | index | The index of the object added to the collection. |
OnIndexChanged(IdxBase)
Called whenever there is a modification in the index.
Declaration
protected virtual void OnIndexChanged(IdxBase index)
Parameters
| Type | Name | Description |
|---|---|---|
| IdxBase | index | The index that has changed |
Remove(TableRowBase)
Removes the given row from the collection
Declaration
public virtual void Remove(TableRowBase row)
Parameters
| Type | Name | Description |
|---|---|---|
| TableRowBase | row | the row to be removed |
RemoveIndex(PropertyDescriptor)
Summary description for TableCollectionBase.
Declaration
public void RemoveIndex(PropertyDescriptor property)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyDescriptor | property |
RemoveSort()
Summary description for TableCollectionBase.
Declaration
public void RemoveSort()
RowsLoad()
Summary description for TableCollectionBase.
Declaration
protected virtual void RowsLoad()
RowsLoad(ITableRowLoadHandlerFactory)
Load the object from the database, using the index.
Declaration
protected virtual void RowsLoad(ITableRowLoadHandlerFactory tableRowHandlerFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| ITableRowLoadHandlerFactory | tableRowHandlerFactory |
RowsLoadAsync(ITableRowLoadHandlerFactory, CancellationToken)
Load the object from the database, using the index.
Declaration
[CreateSyncVersion(OmitNullableDirective = true)]
protected virtual Task RowsLoadAsync(ITableRowLoadHandlerFactory tableRowHandlerFactory, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ITableRowLoadHandlerFactory | tableRowHandlerFactory | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
RowsLoadAsync(CancellationToken)
Summary description for TableCollectionBase.
Declaration
[CreateSyncVersion(OmitNullableDirective = true)]
protected virtual Task RowsLoadAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
Sort(IComparer)
Sort the inner list using the comparer
Declaration
public virtual void Sort(IComparer comparer)
Parameters
| Type | Name | Description |
|---|---|---|
| IComparer | comparer | Comparer to use when sorting the inner list |
Events
CollectionChanged
Summary description for TableCollectionBase.
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
| Type | Description |
|---|---|
| NotifyCollectionChangedEventHandler |
ListChanged
Summary description for TableCollectionBase.
Declaration
public event ListChangedEventHandler ListChanged
Event Type
| Type | Description |
|---|---|
| ListChangedEventHandler |
_onCollectionChanged
Summary description for TableCollectionBase.
Declaration
protected event NotifyCollectionChangedEventHandler _onCollectionChanged
Event Type
| Type | Description |
|---|---|
| NotifyCollectionChangedEventHandler |