Class MDOListTableCache
Cache for items in the MDO tables.
Inherited Members
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
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
OnRefresh()
Declaration
protected override void OnRefresh()