Show / Hide Table of Contents

Class RowCacheBase<Row>

Base class for caches build over HDB rows.

Inheritance
Object
CacheBase
RowCacheBase<Row>
CurrencyCache
ExtAppCache
PriorityCache
RefCountsPermissionCache
Implements
IDisposable
IFlushable
Inherited Members
CacheBase._lastUpdated
CacheBase._cacheState
CacheBase.GetCachedTableNumbers()
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 abstract class RowCacheBase<Row> : CacheBase, IDisposable, IFlushable where Row : TableRowBase
Type Parameters
Name Description
Row

Type of HDB Row cached.

Constructors

RowCacheBase(String, Int32)

Default constructor for CacheBase

Declaration
protected RowCacheBase(string name, int timeout)
Parameters
Type Name Description
String name

Name of the cache.

Int32 timeout

Timeout in [s] for the cache to expire.

Remarks

Classes inheriting this class should only be instantiated through the SoCache.GetCache method

Exceptions
Type Condition
SecurityException

This exception will be thrown if not above elements in the call stack is saved with the SuperOffice strong name.

Properties

Rows

All rows currently in cache

Declaration
protected Dictionary<int, Row>.ValueCollection Rows { get; }
Property Value
Type Description
Dictionary.ValueCollection<>

Methods

AddRow(Row)

Declaration
protected virtual void AddRow(Row row)
Parameters
Type Name Description
Row row

FetchRows()

Fetch the rows from the database.

Declaration
protected abstract TableRowsBase FetchRows()
Returns
Type Description
TableRowsBase

Rows fetched from the database.

GetRowFromId(Int32)

Get the row from it's primary key.

Declaration
public Row GetRowFromId(int id)
Parameters
Type Name Description
Int32 id

Primary key of the row.

Returns
Type Description
Row

The row with the given primary key. If the row does not exist, nothing is returned.

OnFlush()

Flush the content of the cache.

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

OnParseRow(Row)

Event raised for each row fetched, so additional caching can be performed.

Declaration
protected virtual void OnParseRow(Row row)
Parameters
Type Name Description
Row row

OnRefresh()

Refresh the contents of the cache.

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