Class RestrictionStorageBase
Base class for restriction storage providers, containing useful common methods. Inheriting from this class
is useful but not mandatory for a storage provider.
Inheritance
RestrictionStorageBase
Assembly: SoDataBase.dll
Syntax
public abstract class RestrictionStorageBase : IRestrictionStorage, IPlugin
Constructors
RestrictionStorageBase()
Declaration
protected RestrictionStorageBase()
Properties
Context
Declaration
public string Context { get; set; }
Property Value
Methods
CopyCriteria(Int32, Int32, Int32)
Declaration
public virtual void CopyCriteria(int sourceSearchCriteriaId, int ownerTable, int ownerId)
Parameters
Type |
Name |
Description |
Int32 |
sourceSearchCriteriaId |
|
Int32 |
ownerTable |
|
Int32 |
ownerId |
|
CreateDefaultRestrictionInfo(String, ArchiveColumnInfo)
Create an empty restriction information object for the given provider and column. This base implementation does
not differentiate between providers - but a derived class might.
Declaration
protected ArchiveRestrictionInfo CreateDefaultRestrictionInfo(string providerName, ArchiveColumnInfo defaultColumn)
Parameters
Type |
Name |
Description |
String |
providerName |
Name of archive provider
|
ArchiveColumnInfo |
defaultColumn |
Column to make restriction for
|
Returns
CreateDefaultRestrictionInfo(String, ArchiveColumnInfo, String)
Create an empty restriction information object for the given provider and column. This base implementation does
not differentiate between providers - but a derived class might.
Declaration
protected ArchiveRestrictionInfo CreateDefaultRestrictionInfo(string providerName, ArchiveColumnInfo defaultColumn, string defaultRestrictionOperator)
Parameters
Type |
Name |
Description |
String |
providerName |
Name of archive provider
|
ArchiveColumnInfo |
defaultColumn |
Column to make restriction for
|
String |
defaultRestrictionOperator |
Set a specific operator for the default restriction
|
Returns
DeleteCriteria(String, String, Int32)
Declaration
public virtual void DeleteCriteria(string providerName, string storageKey, int groupRank = 0)
Parameters
DeleteRestrictionGroup(String, String, Int32)
Declaration
public virtual void DeleteRestrictionGroup(string providerName, string storageKey, int rank)
Parameters
GetHandledColumns(String)
Declaration
public abstract string[] GetHandledColumns(string providerName)
Parameters
Type |
Name |
Description |
String |
providerName |
|
Returns
GetRestrictionColumns(String, String)
Get the available columns from the archive provider, and keep only those marked with CanRestrict == true.
Return a dictionary of column info indexed by name
Declaration
protected static Dictionary<string, ArchiveColumnInfo> GetRestrictionColumns(string providerName, string context)
Parameters
Type |
Name |
Description |
String |
providerName |
Name of archive provider
|
String |
context |
|
Returns
GetRestrictionGroup(String, String, Int32)
Declaration
public virtual ArchiveRestrictionGroup GetRestrictionGroup(string providerName, string storageKey, int rank)
Parameters
Returns
GetRestrictionGroups(String, String)
Declaration
public virtual ArchiveRestrictionGroup[] GetRestrictionGroups(string providerName, string storageKey)
Parameters
Returns
GetRestrictions(String, String)
Declaration
public abstract ArchiveRestrictionInfo[] GetRestrictions(string providerName, string storageKey)
Parameters
Returns
GetRestrictionsForGroup(String, String, Int32)
Declaration
public virtual ArchiveRestrictionInfo[] GetRestrictionsForGroup(string providerName, string storageKey, int rank)
Parameters
Returns
GetSpecifiedRestrictionsWithDefaults(String, String, String[])
Declaration
public abstract ArchiveRestrictionInfo[] GetSpecifiedRestrictionsWithDefaults(string providerName, string storageKey, params string[] columnNames)
Parameters
Returns
IsSaintColumn(String)
Determine whether a certain column name is a saint column or not (statuses are parsed only for the saintStatus prefix,
which is not bomb-proof but generally good enough)
Declaration
protected bool IsSaintColumn(string columnName)
Parameters
Type |
Name |
Description |
String |
columnName |
|
Returns
Type |
Description |
Boolean |
true if the column is a saint column
|
IsStorageKeyNegativeOrZero(String)
Declaration
protected bool IsStorageKeyNegativeOrZero(string storageKey)
Parameters
Type |
Name |
Description |
String |
storageKey |
|
Returns
IsStorageKeyZero(String)
Determine if the storage key is either empty, or only contains zero-valued id's
Declaration
protected bool IsStorageKeyZero(string storageKey)
Parameters
Type |
Name |
Description |
String |
storageKey |
Storage key
|
Returns
Type |
Description |
Boolean |
true if there are no non-zero id's
|
MapSaintColumn(SaintRestrictionExtenderBase.Columns, out SaintRestrictionExtenderBase.CounterType, out SaintRestrictionExtenderBase.MainType, out Int32)
Declaration
protected void MapSaintColumn(SaintRestrictionExtenderBase.Columns saintColumn, out SaintRestrictionExtenderBase.CounterType counterType, out SaintRestrictionExtenderBase.MainType mainType, out int skipValues)
Parameters
SaveRestrictionGroup(String, String, ArchiveRestrictionGroup)
Declaration
public virtual void SaveRestrictionGroup(string providerName, string storageKey, ArchiveRestrictionGroup restrictionGroup)
Parameters
SaveRestrictions(String, String, ArchiveRestrictionInfo[])
Declaration
public abstract void SaveRestrictions(string providerName, string storageKey, params ArchiveRestrictionInfo[] restrictions)
Parameters
Implements
Extension Methods
EnumUtil.MapEnums<From, To>(From)