Show / Hide Table of Contents

Class TableInfoCollection

The TableInfoCollection class contains the necessary methods and member-variables to control the different tables associated with a sql-expression.

Inheritance
Object
TableInfoCollection
Implements
IEnumerable
ICloneable
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public class TableInfoCollection : IEnumerable, ICloneable

Constructors

TableInfoCollection()

Declaration
public TableInfoCollection()

Methods

Add(TableInfo)

Adds the table to the member-hashtable.

Declaration
public void Add(TableInfo table)
Parameters
Type Name Description
TableInfo table

The table to add.

Add(TableInfo[])

Add the tables to the member-hashtable.

Declaration
public void Add(params TableInfo[] tables)
Parameters
Type Name Description
TableInfo[] tables

The tables to add.

Clone()

Cloning function, copies TableInfos by reference and aliases by value

Declaration
public object Clone()
Returns
Type Description
Object

A new object that is a copy of this instance.

Exists(TableInfo)

Returns true/false in regard that the in-parameter exists or not.

Declaration
protected bool Exists(TableInfo info)
Parameters
Type Name Description
TableInfo info

The table

Returns
Type Description
Boolean

GetAlias(TableInfo)

Returns the table's alias. If the alias does not exist, GetAlias will call the function GenerateAlias to get one generated.

Declaration
public string GetAlias(TableInfo table)
Parameters
Type Name Description
TableInfo table
Returns
Type Description
String

GetEnumerator()

Returns an enumerator for the hashtable _tableInfos.

Declaration
public IEnumerator GetEnumerator()
Returns
Type Description
IEnumerator

An IEnumerator object that can be used to iterate through the collection.

GetFirstInstanceOf(SoTable)

Check if the collection contains at least one instance of the given table (by definition); equivalence is by table definition name; and return this instance. If no equivalent table is found, return null.

Declaration
public TableInfo GetFirstInstanceOf(SoTable definition)
Parameters
Type Name Description
SoTable definition

Definition of table to find

Returns
Type Description
TableInfo

TableInfo, if at least one instance of this table exists

GetNumberOfItems()

Returns the number of items in the member hashtable.

Declaration
public int GetNumberOfItems()
Returns
Type Description
Int32

GetTableInfo(Int32)

Returns the given index's tableInfo.

Declaration
public TableInfo GetTableInfo(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
TableInfo

GetTypedFirstInstanceOf<ReturnType>(SoTable)

Check if the collection contains at least one instance of the given table (by definition); equivalence is by table definition name; and return this instance. If no equivalent table is found, return null.

Declaration
public ReturnType GetTypedFirstInstanceOf<ReturnType>(SoTable definition)
    where ReturnType : TableInfo
Parameters
Type Name Description
SoTable definition

Definition of table to find

Returns
Type Description
ReturnType

TableInfo, if at least one instance of this table exists

Type Parameters
Name Description
ReturnType

Type of tableinfo to return, a cast if performed and will yield NULL if it fails

HasAtLeastOneInstanceOf(SoTable)

Check if the collection contains at least one instance of the given table (by definition); equivalence is by table definition name

Declaration
public bool HasAtLeastOneInstanceOf(SoTable definition)
Parameters
Type Name Description
SoTable definition

Definition of table to find

Returns
Type Description
Boolean

true if at least one instance of this table exists

Remove(TableInfo)

Removes the given in-parameter from the collection if exists there.

Declaration
protected void Remove(TableInfo info)
Parameters
Type Name Description
TableInfo info

The tableinfo you want to remove.

RemoveAll()

Removes all tables from the collection.

Declaration
protected void RemoveAll()

Implements

System.Collections.IEnumerable
System.ICloneable

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