Class TableRowsBase
Summary description for TableCollectionBase.
Inheritance
TableRowsBase
Assembly: SoDataBase.dll
Syntax
public abstract class TableRowsBase : NestedCollectionPersist, INestedPersist, IEnumerable<INestedPersist>, ISoCollection, IList, ICollection, IEnumerable, INotifyCollectionChanged, IBindingList
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
Declaration
protected bool _allHasBeenMarkedForDelete
Field Value
_idx
Reference to the index used to load the object from the database
Declaration
Field Value
_innerList
Declaration
protected ArrayList _innerList
Field Value
_sentries
Declaration
protected SentryCollection _sentries
Field Value
Properties
AllowEdit
Declaration
public bool AllowEdit { get; }
Property Value
AllowNew
Declaration
public bool AllowNew { get; }
Property Value
AllowRemove
Declaration
public bool AllowRemove { get; }
Property Value
Count
The number of rows in the collection.
Declaration
public override int Count { get; }
Property Value
Overrides
Index
The index used to load the collection.
Declaration
public IdxBase Index { get; }
Property Value
IsDirty
Is the collection dirty, true if any of the elements of the collection is dirty.
Declaration
public override bool IsDirty { get; }
Property Value
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
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
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
IsSorted
Declaration
public bool IsSorted { get; }
Property Value
Item[Int32]
Declaration
public TableRowBase this[int index] { get; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Property Value
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
SortDirection
Declaration
public ListSortDirection SortDirection { get; }
Property Value
SortProperty
Declaration
public PropertyDescriptor SortProperty { get; }
Property Value
SupportsChangeNotification
Declaration
public bool SupportsChangeNotification { get; }
Property Value
SupportsSearching
Declaration
public bool SupportsSearching { get; }
Property Value
SupportsSorting
Declaration
public bool SupportsSorting { get; }
Property Value
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 |
Int32 |
The index of the added row.
|
AddIndex(PropertyDescriptor)
Declaration
public void AddIndex(PropertyDescriptor property)
Parameters
AddNew()
Declaration
public virtual TableRowBase AddNew()
Returns
ApplySort(PropertyDescriptor, ListSortDirection)
Declaration
public void ApplySort(PropertyDescriptor property, ListSortDirection direction)
Parameters
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 |
Boolean |
True if value is found in the Array; otherwise, False
|
CopyTo(Array, Int32)
Declaration
public void CopyTo(Array list, int index)
Parameters
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
|
Delete()
Delete all contained objects.
Declaration
public virtual void Delete()
Find(PropertyDescriptor, Object)
Declaration
public int Find(PropertyDescriptor property, object key)
Parameters
Returns
GetEnumerator()
Retrieve an enumerator for enumerating over the collection.
Declaration
public override IEnumerator GetEnumerator()
Returns
Overrides
GetPrimaryKeys()
Get an array containing the primary keys of this collection of table rows
Declaration
public int[] GetPrimaryKeys()
Returns
Type |
Description |
Int32[] |
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 |
Int32 |
The index of the object.
|
Load(IdxBase)
Declaration
protected void Load(IdxBase idx)
Parameters
OnAdded(Object, Int32)
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.
|
Int32 |
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)
Declaration
public void RemoveIndex(PropertyDescriptor property)
Parameters
RemoveSort()
Declaration
RowsLoad()
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 |
SuperOffice.CRM.Rows.ITableRowLoadHandlerFactory |
tableRowHandlerFactory |
|
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
_onCollectionChanged
Declaration
protected event NotifyCollectionChangedEventHandler _onCollectionChanged
Event Type
CollectionChanged
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
ListChanged
Declaration
public event ListChangedEventHandler ListChanged
Event Type
Explicit Interface Implementations
ISoCollection.Add(ISoItem)
Declaration
int ISoCollection.Add(ISoItem item)
Parameters
Returns
ISoCollection.AddNew()
Declaration
ISoItem ISoCollection.AddNew()
Returns
ICollection.Count
The number of elements contained in the underlying collection.
Declaration
int ICollection.Count { get; }
Returns
Type |
Description |
Int32 |
Number of items in underlying collection.
|
ICollection.IsSynchronized
Declaration
bool ICollection.IsSynchronized { get; }
Returns
ICollection.SyncRoot
Declaration
object ICollection.SyncRoot { get; }
Returns
IList.Add(Object)
Declaration
Parameters
Type |
Name |
Description |
Object |
o |
The object to add.
|
Returns
Type |
Description |
Int32 |
The index of the added object.
|
IList.Clear()
Declaration
IList.get_Item(Int32)
Declaration
object IList.get_Item(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
IList.Insert(Int32, Object)
Declaration
void IList.Insert(int i, object o)
Parameters
Type |
Name |
Description |
Int32 |
i |
Not used. Object will be added as last element.
|
Object |
o |
The object to add.
|
IList.Item[Int32]
Declaration
object IList.this[] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
IList.Remove(Object)
Declaration
void IList.Remove(object o)
Parameters
Type |
Name |
Description |
Object |
o |
|
IList.RemoveAt(Int32)
Declaration
void IList.RemoveAt(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
The index pointing to the object to remove.
|
IList.set_Item(Int32, Object)
Declaration
void IList.set_Item(int index, object value)
Parameters
Implements
Extension Methods
EnumUtil.MapEnums<From, To>(From)