Table of Contents

Class QueryInfoProvider

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Enables access to queries.

[ProviderInterface(typeof(IQueryInfoProvider))]
public class QueryInfoProvider : AbstractInfoProvider<QueryInfo, QueryInfoProvider>, IInfoProvider, ICustomizableProvider, IBulkOperationProvider, IWebFarmProvider, IInfoValidator<QueryInfo>, IInfoByGuidProvider<QueryInfo>, IInfoByNameProvider<QueryInfo>, IBulkInfoProvider<QueryInfo>, IFullNameInfoProvider, IQueryInfoProvider, IInfoProvider<QueryInfo>, IInfoByIdProvider<QueryInfo>
Inheritance
object
QueryInfoProvider
Implements
Inherited Members
Extension Methods

Constructors

QueryInfoProvider()

Constructor

public QueryInfoProvider()

Properties

UseAutomaticQueriesAsPrimary

If true, the automatic queries are used as the primary source of the queries.

[Obsolete("Property was not intended for public use and will be removed in the next version.")]
[ObsoleteSince(28, 2)]
public static bool UseAutomaticQueriesAsPrimary { get; set; }

Property Value

bool

Methods

ClearDefaultQueries(DataClassInfo, bool)

Clears the default queries for the given class name from hashtable.

[Obsolete("Method is deprecated and will be removed in next version.")]
[ObsoleteSince(28, 2)]
public static void ClearDefaultQueries(DataClassInfo dci, bool dataClass)

Parameters

dci DataClassInfo

Data class object

dataClass bool

If true, removes DataClass queries

GetClassName(string)

Gets the class name from the query name.

[Obsolete("Method is obsolete and will be removed in next version.")]
[ObsoleteSince(27, 0)]
public static string GetClassName(string queryName)

Parameters

queryName string

Query name

Returns

string

GetFullNameDictionary()

Creates new dictionary for caching the objects by full name

public ProviderInfoDictionary<string> GetFullNameDictionary()

Returns

ProviderInfoDictionary<string>

GetFullNameWhereCondition(string)

Gets the where condition that searches the object based on the given full name

public IWhereCondition GetFullNameWhereCondition(string fullName)

Parameters

fullName string

Object full name

Returns

IWhereCondition

GetObjectQueryInternal()

Gets the object query for the provider

protected override ObjectQuery<QueryInfo> GetObjectQueryInternal()

Returns

ObjectQuery<QueryInfo>

GetQueryCacheDependencies(string)

Gets the cache dependencies for the query.

[Obsolete("Method is obsolete and will be removed in next version.")]
[ObsoleteSince(27, 0)]
public static string GetQueryCacheDependencies(string queryName)

Parameters

queryName string

Query name

Returns

string

GetQueryInfo(string, bool)

Returns QueryInfo with specified name.

public static QueryInfo GetQueryInfo(string name, bool throwException = true)

Parameters

name string

QueryInfo name.

throwException bool

If true, exception is thrown if query does not exist.

Returns

QueryInfo

Query object. Null if the query doesn't exist.

GetQueryInfoFromDB(string)

Returns QueryInfo with specified name.

[Obsolete("Method is obsolete and will be removed in next version.")]
[ObsoleteSince(27, 0)]
public static QueryInfo GetQueryInfoFromDB(string name)

Parameters

name string

QueryInfo name

Returns

QueryInfo

Query object. Null if the query doesn't exist.

GetQueryInfoInternal(string)

Returns QueryInfo with specified name.

[Obsolete("Method was not intended for public use and will be removed in the next version.")]
[ObsoleteSince(28, 2)]
public virtual QueryInfo GetQueryInfoInternal(string queryName)

Parameters

queryName string

QueryInfo name

Returns

QueryInfo

Query object. Null if the query doesn't exist.

GetQueryType(int)

Gets the query type based on the given type ID

public static QueryTypeEnum GetQueryType(int queryTypeId)

Parameters

queryTypeId int

Query type ID

Returns

QueryTypeEnum

GetQueryTypeID(QueryTypeEnum)

Gets the query type ID based on the given type

public static int GetQueryTypeID(QueryTypeEnum queryType)

Parameters

queryType QueryTypeEnum

Query type

Returns

int

QueryIsExplicitlyDefined(string, string)

Returns true if the given query is explicitly defined (exists in the database).

[Obsolete("Method is deprecated and will be removed in next version.")]
[ObsoleteSince(28, 2)]
public static bool QueryIsExplicitlyDefined(string className, string queryName)

Parameters

className string

Class name.

queryName string

Query name.

Returns

bool