Show / Hide Table of Contents

Class MDOListTableCache

Cache for items in the MDO tables.

Inheritance
Object
CacheBase
MDOListTableCache
Implements
IDisposable
IFlushable
Inherited Members
CacheBase._lastUpdated
CacheBase._cacheState
CacheBase.IsCacheInvalidated(Int32, SqlType, Int32)
CacheBase.Dispose()
CacheBase.Validate()
CacheBase.Refresh()
CacheBase.Flush()
CacheBase.OnExpired()
CacheBase.OnRefreshed()
CacheBase.OnFlushed()
CacheBase.OnDisposed()
CacheBase.Lock
CacheBase.Name
CacheBase.CacheType
CacheBase.Timeout
CacheBase.State
CacheBase.IsValid
CacheBase.Expired
CacheBase.Refreshed
CacheBase.Flushed
CacheBase.Disposed
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Cache
Assembly: SoDataBase.dll
Syntax
public class MDOListTableCache : CacheBase, IDisposable, IFlushable
Remarks

This cache include the values of the items in the different MDO tables.
Sentry is not applied when fetching the values from the database, hence this cache should not be used when populating lists. It is however very useful when the values needs to be displayed with the entities.

Methods

GetAllItems(SoTable)

Get all items based on the MDO table definition.

Declaration
public List<MDOListTableCache.MDOCacheElement> GetAllItems(SoTable table)
Parameters
Type Name Description
SoTable table

Definition of the MDO table.

Returns
Type Description
List<MDOListTableCache.MDOCacheElement>

Information about the item in the database.

Exceptions
Type Condition
SoIllegalOperationException

Thrown when the table is not an MDO list.

GetAllItems(TableInfo)

Get all items based on the MDO table definition.

Declaration
public List<MDOListTableCache.MDOCacheElement> GetAllItems(TableInfo table)
Parameters
Type Name Description
TableInfo table

Definition of the MDO table.

Returns
Type Description
List<MDOListTableCache.MDOCacheElement>

Information about the item in the database.

Exceptions
Type Condition
SoIllegalOperationException

Thrown when the table is not an MDO list.

GetCachedTableNumbers()

Declaration
public override int[] GetCachedTableNumbers()
Returns
Type Description
Int32[]
Overrides
CacheBase.GetCachedTableNumbers()

GetCurrent()

Obtain an instance of the cache.

Declaration
public static MDOListTableCache GetCurrent()
Returns
Type Description
MDOListTableCache

Instance of the cache.

GetItemById(SoTable, Int32)

Get an item based on the MDO table definition and primary key of the item in the table.

Declaration
public MDOListTableCache.MDOCacheElement GetItemById(SoTable table, int id)
Parameters
Type Name Description
SoTable table

Definition of the MDO table.

Int32 id

Primary key of the item in the table.

Returns
Type Description
MDOListTableCache.MDOCacheElement

Information about the item in the database.

Exceptions
Type Condition
SoIllegalOperationException

Thrown when the table is not an MDO list.

GetItemById(TableInfo, Int32)

Get an item based on the MDO table definition and primary key of the item in the table.

Declaration
public MDOListTableCache.MDOCacheElement GetItemById(TableInfo table, int id)
Parameters
Type Name Description
TableInfo table

Definition of the MDO table.

Int32 id

Primary key of the item in the table.

Returns
Type Description
MDOListTableCache.MDOCacheElement

Information about the item in the database.

Exceptions
Type Condition
SoIllegalOperationException

Thrown when the table is not an MDO list.

GetItemByName(SoTable, String)

Get an item based on the MDO table definition and the name of the item in the table.

Declaration
public MDOListTableCache.MDOCacheElement GetItemByName(SoTable table, string name)
Parameters
Type Name Description
SoTable table

Definition of the MDO table.

String name

Name of the item.

Returns
Type Description
MDOListTableCache.MDOCacheElement

Information about the item in the database.

Exceptions
Type Condition
SoIllegalOperationException

Thrown when the table is not an MDO list.

GetItemByName(TableInfo, String)

Get an item based on the MDO table definition and the name of the item in the table.

Declaration
public MDOListTableCache.MDOCacheElement GetItemByName(TableInfo table, string name)
Parameters
Type Name Description
TableInfo table

Definition of the MDO table.

String name

Name of the item.

Returns
Type Description
MDOListTableCache.MDOCacheElement

Information about the item in the database.

Exceptions
Type Condition
SoIllegalOperationException

Thrown when the table is not an MDO list.

GetNameById(SoTable, Int32)

Get an item name on the MDO table definition and primary key of the item in the table. This method never returns null, instead you get an empty string if the element does not exist.

Declaration
public string GetNameById(SoTable table, int id)
Parameters
Type Name Description
SoTable table

Definition of the MDO table.

Int32 id

Primary key of the item in the table.

Returns
Type Description
String

Name from the list element, or the empty string

Exceptions
Type Condition
SoIllegalOperationException

Thrown when the table is not an MDO list.

GetNameById(TableInfo, Int32)

Get an item name on the MDO table definition and primary key of the item in the table. This method never returns null, instead you get an empty string if the element does not exist.

Declaration
public string GetNameById(TableInfo table, int id)
Parameters
Type Name Description
TableInfo table

Definition of the MDO table.

Int32 id

Primary key of the item in the table.

Returns
Type Description
String

Name from the list element, or the empty string

Exceptions
Type Condition
SoIllegalOperationException

Thrown when the table is not an MDO list.

OnFlush()

Declaration
protected override void OnFlush()
Overrides
CacheBase.OnFlush()

OnRefresh()

Declaration
protected override void OnRefresh()
Overrides
CacheBase.OnRefresh()

Implements

System.IDisposable
IFlushable

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