Click or drag to resize

MapperFilters Class

A collection of MapperFilter objects. MapperFilter objects are used to filter an IMapper in order to restrict the rows queried by the mapper. Filters managed in the Studio are stored in the xot_filters table. Filters for a particular mapper object are stored in its Filters collection, the only real use of this collection object.
Inheritance Hierarchy

Namespace:  NetQuarry.Data
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public class MapperFilters : EAPCollectionBase, 
	ICloneable

The MapperFilters type exposes the following members.

Constructors
  NameDescription
Public methodMapperFilters
Creates the collection, setting the base type to MapperFilter.
Public methodMapperFilters(Int32)
Creates the collection, setting the base type to MapperFilter.
Top
Properties
  NameDescription
Public propertyCount
The number of elements actually contained in the ArrayList.
(Inherited from EAPCollectionBase.)
Public propertyDebugInfo
Gets debug information for this filter. To append to DebugInfo use AddDebugInfo(String). DebugInfo can help a developer determine where a filter was added and what its purpose is. See DebugInfo for debug information on individual MapperFilter items. Note that this information is currently visible only in the debugger.
Public propertyDirty
Used to track whether the any filter within the collection has changed. If cleared, the Dirty flag is cleared on all filters in the collection. When set, the collection's Dirty flag is set, but the Dirty flags of the individual filters are not affected.
Public propertyHasPKFilter
Determines whether or not the collection contains an enabled (not Disabled) PK filter.
Public propertyIsFixedSize
true if the ArrayList has a fixed size; otherwise, false. The default is false.
(Inherited from EAPCollectionBase.)
Public propertyIsReadOnly
Returns true if the collection is read-only. (Default is false)
(Inherited from EAPCollectionBase.)
Public propertyIsSynchronized
true if access to the internal ArrayList is synchronized (thread-safe); otherwise, false. The default is false.
(Inherited from EAPCollectionBase.)
Public propertyItemInt32
Indexer for this collection.
Public propertyItemString
Indexer for this collection.
Public propertyOverrideFilter
The filters have been modified and should override whatever filtering is being carried by the mapper in its internal state. This property is primarily intended for internal use by IFilterControl components such as the SearchBar.
Public propertyRowKey
Gets the RowKey from the collection where the collection has at least one filter marked PK that IsActive and has a non-null/empty FieldValue.
Public propertySyncRoot
An object that can be used to synchronize access to the ArrayList.
(Inherited from EAPCollectionBase.)
Public propertyTextItems
The filters collection's localized text collection. This is intended for internal use only.
Top
Methods
  NameDescription
Public methodAdd(MapperFilter)
Adds a MapperFilter to the collection
Protected methodAdd(String, Object)
Adds an object to the collection. Override. This method simply calls the Add method with CollectionAddFlags.replace as the flags.
(Inherited from EAPCollectionBase.)
Public methodAdd(String, MapperFilter)
Adds a MapperFilter object to the collection.
Public methodAdd(String, String)
Simple way to add a SQL filter CLAUSE to the collection.
Protected methodAdd(String, Object, CollectionAddFlags)
Adds an item to the collection
(Inherited from EAPCollectionBase.)
Protected methodAddAt
Adds an item to the collection at the specified index. To append an item use -1 or the collection item count as the index.
(Inherited from EAPCollectionBase.)
Public methodAddDebugInfo
Append debug information to this collection's DebugInfo text. Note that this information is currently visible only in the debugger.
Public methodAddRowKeyFilter(IMapper, String)
Creates a new RowKey MapperFilter and adds it to the collection. The filter is built by calling the provided mapper's RowKeyFilter(String) and passing the mapper's RowKey. See CreateRowKeyFilter(String, String, String) for more details on a RowKey filter.
Public methodAddRowKeyFilter(String, String, String)
Creates a new RowKey MapperFilter and adds it to the collection. See CreateRowKeyFilter(String, String, String) for more details on a RowKey filter.
Public methodClear
Clears the collection
(Inherited from EAPCollectionBase.)
Public methodClearByFlag
Clears all filters having any of the specified FilterFlags set.
Public methodClearExceptFlag
Clears all filters not having any of the specified FilterFlags set.
Public methodClone
Creates a copy of the object and returns it.
Public methodContains
Determines whether an element is in the collection.
(Inherited from EAPCollectionBase.)
Public methodContainsClause
Determine if a particular SQL filter clause is already present in the collection.
Public methodContainsKey
Checks for the existence of an item in the hashtable
(Inherited from EAPCollectionBase.)
Public methodCopyTo
Copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target array.
(Inherited from EAPCollectionBase.)
Public methodStatic memberCreateInstance(IAppContext, String)
Creates an instance of the collection. If metadata caching is enabled, this method retrieves an instance from the global cache and creates a clone of the object. If metadata caching is enabled and the object isn't yet cached, this method caches the object.
Public methodStatic memberCreateInstance(IAppContext, String, Boolean)
Creates an instance of the collection. If metadata caching is enabled, this method retrieves an instance from the global cache and creates a clone of the object. If metadata caching is enabled and the object isn't yet cached, this method caches the object.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that can iterate through the ArrayList.
(Inherited from EAPCollectionBase.)
Public methodGetFilter(GetFilterFlags)
Returns the complete filter by combining filters in the collection according to provided GetFilterFlags. In general GetFilter(GetFilterFlags, IMapper) is preferred as it has improved handlng for NamedFilters. For testing for filter existence HasFilter(GetFilterFlags, FilterFlags) is preferred.
Public methodGetFilter(GetFilterFlags, IMapper)
Returns the complete filter by combining filters in the collection according to provided GetFilterFlags and resolving any filters marked FutureEval (which requires the IMapper. For testing for filter existence HasFilter(GetFilterFlags, FilterFlags) is preferred.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Protected methodGetItem(Int32)
Returns an item that matches the specified string index
(Inherited from EAPCollectionBase.)
Protected methodGetItem(String)
Returns an item that matches the specified string index
(Inherited from EAPCollectionBase.)
Public methodGetItemName
Returns the name of the item.
(Overrides EAPCollectionBaseGetItemName(Object).)
Public methodGetLikelyParentKeyValue
Inspects the filters collection for filters marked Parent and extracts the row key value (FieldValue) associated with each such filter. Some Parent filters may not have non-null/empty 'values' associated with them. If multiple Parent filters with non-null/empty values are found, then, arbitrarily, one of the values will be returned, but the fact is devlogged.
Public methodGetLikelyPKValue
Inspects the filters collection for filters marked PK and extracts the row key value (FieldValue) associated with each such filter. Some PK filters may not have non-null/empty 'values' associated with them. If multiple PK filters with non-null/empty values are found, then, arbitrarily, one of the values will be returned, but the fact is devlogged.
Public methodGetLongDesc
Construct a detailed description for the entire collection of filters.
Public methodGetShortDesc
Calculates a short description for the entire collection of applied filters.
Public methodGetShortDesc(FilterDescOptions)
Calculates a short description for the entire collection of applied filters per the provided FilterDescOptions.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasFilter
Determines the existence of one or more relevant filters in the collection according to provided GetFilterFlags. Note that use of HasFilter(GetFilterFlags, FilterFlags) is preferred over GetFilter(GetFilterFlags) when testing for the existence of filtering.
Public methodIndexOf
Returns the zero-based index of the first occurrence of an object in the internal ArrayList or in a portion of it.
(Inherited from EAPCollectionBase.)
Public methodIndexOfKey
Returns the index of the item in the collection (by key)
(Inherited from EAPCollectionBase.)
Public methodInsert
Inserts an element into the internal ArrayList at the specified index
(Inherited from EAPCollectionBase.)
Protected methodIsDirty
Determine the current dirty state of the collection and all MapperFilter items in it.
Protected methodIsMarkedForDeletion
Returns true if the item is marked for deletion.
(Overrides EAPCollectionBaseIsMarkedForDeletion(Object).)
Protected methodIsTypeOK
Verifies the item is an acceptable type. Generally this is a test like "return (item is [class]);".
(Overrides EAPCollectionBaseIsTypeOK(Object).)
Public methodLoad
Loads the collection from the xmt_filters table.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodRecalcHash
Recalculates the internal hash
(Inherited from EAPCollectionBase.)
Public methodRemove(Object)
Removes the first occurrence of a specific object from the collection
(Inherited from EAPCollectionBase.)
Public methodRemove(String)
Remove the specified item from the collection.
(Inherited from EAPCollectionBase.)
Public methodRemoveAt
Removes the element at the specified index
(Inherited from EAPCollectionBase.)
Public methodRemoveMarkedItems
Removes the properties marked for deletion.
(Inherited from EAPCollectionBase.)
Public methodRemoveRange
Removes the element at the specified index
(Inherited from EAPCollectionBase.)
Protected methodSetDirty
Set the dirty state of the collection and possibly all items in it.
Protected methodSetItem(Int32, Object)
Sets an item's value at the specified index.
(Inherited from EAPCollectionBase.)
Protected methodSetItem(String, Object)
Sets an item's value at the string index indicated by the parameters.
(Inherited from EAPCollectionBase.)
Public methodSort(Boolean)
Sort the list by its key value.
(Inherited from EAPCollectionBase.)
Public methodSort(IComparer)
Sort the collection using the provided comparer.
(Inherited from EAPCollectionBase.)
Public methodStatic memberSplitClauses
Splits a string of zero or more filter or description clauses that were munged using ClauseSeparator. Generally the munged string will have been created by calling either GetFilter(GetFilterFlags) or GetLongDesc(GetFilterFlags) and passing the UseSeparator flag.
Public methodSubset
Obtain a MapperFilters collection with a subset of this collection's MapperFilter filters where each has all the specified flags set. For example, just ForUser to get all user-applied filters.
Public methodToolbarDesc
Get a string describing these filters and appropriate for use as a toolbar description.
Public methodToString
Construct the complete filter from this collection.
(Overrides ObjectToString.)
Public methodToString(GetFilterFlags)
Construct the complete filter from this collection (per GetFilterFlags flags).
Public methodTruncate
Truncate the array starting at the specified index.
(Inherited from EAPCollectionBase.)
Protected methodUnload
Called when the collection is cleared allowing a derived class to clean up.
(Inherited from EAPCollectionBase.)
Top
Fields
  NameDescription
Public fieldStatic memberClauseSeparator
Used in conjuntion with UseSeparator to allow multiple filters to be combined into one string that can be split back into its constituent clauses. Munged filters/description are typically created by passing this flag to GetFilter(GetFilterFlags) or GetLongDesc(GetFilterFlags) and later separated using SplitClauses(String).
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
See Also