Class EntitySchemaQueryFilterCollection
Collection of filters of the entity schema query.
Inheritance
Implements
Inherited Members
Namespace: Terrasoft.Core.Entities
Assembly: Terrasoft.Core.dll
Syntax
public class EntitySchemaQueryFilterCollection : Collection<IEntitySchemaQueryFilterItem>, IList<IEntitySchemaQueryFilterItem>, ICollection<IEntitySchemaQueryFilterItem>, IList, ICollection, IReadOnlyList<IEntitySchemaQueryFilterItem>, IReadOnlyCollection<IEntitySchemaQueryFilterItem>, IEnumerable<IEntitySchemaQueryFilterItem>, IEnumerable, IEntitySchemaQueryFilterItem, ICloneable, IMetaDataSerializable
Constructors
EntitySchemaQueryFilterCollection(EntitySchemaQuery)
Initializes the EntitySchemaQueryFilterCollection instance for the specified entity schema query.
Declaration
public EntitySchemaQueryFilterCollection(EntitySchemaQuery parentQuery)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQuery | parentQuery | Query against the schema of the entity that contains the current collection of filters. |
EntitySchemaQueryFilterCollection(EntitySchemaQuery, LogicalOperationStrict)
Initializes the EntitySchemaQueryFilterCollection instance, the filters in which are combined with the specified logical operation, for a given query to the object schema.
Declaration
public EntitySchemaQueryFilterCollection(EntitySchemaQuery parentQuery, LogicalOperationStrict logicalOperation)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQuery | parentQuery | Query against the schema of the entity that contains the current collection of filters. |
LogicalOperationStrict | logicalOperation | Type of the logical operation that combines filters in the current collection. |
EntitySchemaQueryFilterCollection(EntitySchemaQuery, LogicalOperationStrict, IEntitySchemaQueryFilterItem[])
Initializes the EntitySchemaQueryFilterCollection instance with the specified array of items to add in the collection and type of the logical operation that combines the filters.
Declaration
public EntitySchemaQueryFilterCollection(EntitySchemaQuery parentQuery, LogicalOperationStrict logicalOperation, params IEntitySchemaQueryFilterItem[] items)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQuery | parentQuery | Query against the schema of the entity that contains the current collection of filters. |
LogicalOperationStrict | logicalOperation | Type of the logical operation that combines filters in the collection. |
IEntitySchemaQueryFilterItem[] | items | Array of items to add in the current collection of filters. |
EntitySchemaQueryFilterCollection(EntitySchemaQuery, IEntitySchemaQueryFilterItem[])
Initializes the EntitySchemaQueryFilterCollection instance with the specified array of items that are added to the current collection, for a given query to the object schema.
Declaration
public EntitySchemaQueryFilterCollection(EntitySchemaQuery parentQuery, params IEntitySchemaQueryFilterItem[] items)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQuery | parentQuery | Query against the schema of the entity that contains the current collection of filters. |
IEntitySchemaQueryFilterItem[] | items | Array of items to add in the current collection of filters. |
EntitySchemaQueryFilterCollection(EntitySchemaQueryFilterCollection)
Initializes the EntitySchemaQueryFilterCollection instance that is a clone of the passed-in collection of filters.
Declaration
public EntitySchemaQueryFilterCollection(EntitySchemaQueryFilterCollection source)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaQueryFilterCollection | source | Instance of the EntitySchemaQueryFilterCollection collection of filters whose clone is being created. |
Properties
IsEnabled
Determines whether to use the filter in the resulting sql query.
Declaration
public bool IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsNot
Determines whether to use the NOT operator before the collection of filters.
Declaration
public bool IsNot { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LogicalOperation
Type of the logical operation that combines filters in the collection.
Declaration
public LogicalOperationStrict LogicalOperation { get; set; }
Property Value
Type | Description |
---|---|
LogicalOperationStrict |
Name
Name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ParentQuery
Query against the schema of the entity that contains the collection of filters.
Declaration
public EntitySchemaQuery ParentQuery { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaQuery |
Methods
AddUsingJoinedExpressions(Collection<EntitySchemaQueryExpression>)
Fills the passed-in collection with column expressions from the collection of filters, which are selected from the linked tables.
Declaration
public void AddUsingJoinedExpressions(Collection<EntitySchemaQueryExpression> expressions)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ObjectModel.Collection<EntitySchemaQueryExpression> | expressions | Collection of column expressions. |
ApplyMetaDataValue(DataReader)
Declaration
protected virtual void ApplyMetaDataValue(DataReader reader)
Parameters
Type | Name | Description |
---|---|---|
DataReader | reader |
ClearItems()
Declaration
protected override void ClearItems()
Overrides
Clone()
Creates the clone of the current EntitySchemaQueryFilterCollection instance.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | A System.Object instance that is a clone of the current collection of filters. |
FindByName(String)
Searches for the item with the specified name.
Declaration
public IEntitySchemaQueryFilterItem FindByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the item. |
Returns
Type | Description |
---|---|
IEntitySchemaQueryFilterItem | Item with the |
GetByName(String)
Gets the item with the specified name. If no such item is found, an exception is thrown.
Declaration
public EntitySchemaQueryFilter GetByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the item. |
Returns
Type | Description |
---|---|
EntitySchemaQueryFilter | Item with the |
Exceptions
Type | Condition |
---|---|
ArgumentNullOrEmptyException | If the empty value or |
ItemNotFoundException | If the item with the |
InsertItem(Int32, IEntitySchemaQueryFilterItem)
Declaration
protected override void InsertItem(int index, IEntitySchemaQueryFilterItem item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
IEntitySchemaQueryFilterItem | item |
Overrides
ReadMetaData(DataReader)
Deserializes the collection of filters, using the passed-in DataReader instance.
Declaration
public virtual void ReadMetaData(DataReader reader)
Parameters
Type | Name | Description |
---|---|---|
DataReader | reader | The DataReader instance used for deserializing the collection of filters. |
RemoveItem(Int32)
Declaration
protected override void RemoveItem(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Overrides
SetEnabled(Boolean)
Sets the IsEnabled property to the passed-in value.
Declaration
public EntitySchemaQueryFilterCollection SetEnabled(bool isEnabled)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isEnabled | The value set for the IsEnabled property. |
Returns
Type | Description |
---|---|
EntitySchemaQueryFilterCollection | The current filter instance. |
SetItem(Int32, IEntitySchemaQueryFilterItem)
Declaration
protected override void SetItem(int index, IEntitySchemaQueryFilterItem item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
IEntitySchemaQueryFilterItem | item |
Overrides
WriteMetaData(DataWriter)
Serializes the collection of filters, using the passed-in DataWriter instance.
Declaration
public virtual void WriteMetaData(DataWriter writer)
Parameters
Type | Name | Description |
---|---|---|
DataWriter | writer | The DataWriter instance used for serializing the collection of filters. |
Explicit Interface Implementations
IEntitySchemaQueryFilterItem.GetFilterInstances()
Gets the enumeration of filter instances in the collection.
Declaration
IEnumerable<EntitySchemaQueryFilter> IEntitySchemaQueryFilterItem.GetFilterInstances()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EntitySchemaQueryFilter> | Enumeration of filter instances in the collection. |