SavedFilter Class |
SavedFilters may be static or dynamic:
You can obtain a SavedFilter from an IMapper using the FilterSave command. This will cause the mapper to created a SavedFilter reflecting its current filtering including any FullTextSearchValue. It will also include a comprehensive Description for the filter. You can apply a SavedFilter to an IMapper using the SavedFilterApply command. This will apply the Filter clause as well as any FullTextSearchValue.
SavedFilters provide a safe way to include mapper filtering in a URL. You can use one of the RegisterReqFilter overloads to save a filter clause to the operational database and return a unique signature that can be included as the value for the standard flt parameter in a navigation url. Filters referenced in this manner can be included in a URL without risk of a SQL injection attack. You can use one of the ExtractFilterFromReq overloads to obtain a SavedFilter from a registered filter query parameter.
Namespace: NetQuarry
The SavedFilter type exposes the following members.
Name | Description | |
---|---|---|
SavedFilter |
Full constructor for the SavedFilter class.
|
Name | Description | |
---|---|---|
Attributes | The FilterAttributes for the filter. | |
CreateDate | The UTC date/time at which the filter was created. | |
CreatorID | The creator of the filter. | |
Criteria | The criteria use to create the filter. This XML stores criteria
information that can be used to maintain the filter. | |
Description |
The localized description of the filter.
A more verbose description is available from VerboseDescription.
| |
EndDate | The optional UTC date/time at which the filter expires. See also StartDate. | |
Filter | The SQL filter clause for the filter. Note that for true static filters
the filter clause will a subquery against the xot_saved_filter_keys table. | |
From |
The SQL FROM clause (typically a table or view name) for which the filter is intended.
| |
FullTextSearchValue |
The fulltext search value for this filter. Used in conjunction with FullTextTable.
| |
FullTextTable |
The fulltext table for this filter. Used in conjunction with FullTextSearchValue.
| |
ID | The unique (GUID) ID for the filter.
The ID serves as the key in the SavedFilters collection. | |
KeyColumn |
The column in the underlying table containing the single primary key uniquely
identifying a row in the table. This key is used in filter clause building.
| |
KeyCount |
Gets the number of keys for this static (Static) filter. If the
filter is not static, or the number of keys cannot be determined, -1 is returned. Note that,
for performance reasons, KeyCount is preferred over flt.Keys.Count
if no other use of the Keys collection is being made because accessing the Keys
collection will cause the keys collection to be loaded if it was not already loaded.
| |
Keys |
The list of keys for a static filter. If the filter is not marked Static then
an empty set will be returned. Note that accessing the Keys collection on a static filter will
cause the collection to be loaded from the xot_saved_filter_keys table. For improved performance, if
the Keys collection is being accessed solely to get the count, use KeyCount which
will not cause the collection to be loaded.
| |
KeysLoaded |
Gets/Sets a boolean value that indicates if the Keys for this filter have been loaded.
| |
LocaleKey | The locale of the base filter. Note that if localized text
is available for the filter it will be used in place of the original,
non-localized text from this locale. | |
ModuleKey | The module to which this filter belongs. | |
Moniker | The pseudo-unique moniker for the filter. Ideally, this should be unique within
the SavedFilters collection, but is not guaranteed to be so. | |
MOP | The module to which this filter belongs. | |
Name | The localized, natural language name of the filter. | |
OwnerID | The owner (if any) of the filter. If no owner is specified then the
filter is globally available. | |
PageElementID |
Gets/sets the PageElementID for the PageElementInfo for this filter.
This should be set only when the filter is specific to the specified page element.
| |
PreFilter | The SQL PreFilter clause for the filter. | |
Sort | The sort clause for the filter, if any. | |
StartDate | The optional UTC date/time from which the filter is valid. See also EndDate. | |
TenantId |
The Tenant ID for this filter. Tenant may be NULL.
| |
Usage |
Gets/sets the filter Usage. The Usage can be used to correlate a filter with a certain set of functionality.
You can use UsageSpecific to restrict visibility of the filter.
| |
VerboseDescription |
The localized verbose description for this filter.
A more succinct description is available from Description.
|
Name | Description | |
---|---|---|
CanUserShareFilters |
Determines whether the current application/tenant/user is allowed to share filters.
| |
Close |
Close the filter.
| |
Convert(IAppContext, IDatabase, SaveFilterConvertOptions) |
Convert the Saved Filter from one form to another per provided SaveFilterConvertOptions.
| |
Convert(IAppContext, IDatabase, SaveFilterConvertOptions, Int32) |
Convert the Saved Filter from one form to another per provided SaveFilterConvertOptions
and applying a TOPN clause.
| |
Copy |
Copy this filter's database records and return a newly created SavedFilter object using them.
| |
Delete |
Delete the filter.
| |
Equals | (Inherited from Object.) | |
ExtractFilterFromReq(IAppContext, HttpRequest) |
Extract any general filter clause from the 'flt' parameter of the request.
See ExtractFilterFromReq(IAppContext, HttpRequest, String, SavedFilter) for more information.
| |
ExtractFilterFromReq(IAppContext, HttpRequest, SavedFilter) |
Extract any general filter clause and its SavedFilter from the 'flt' parameter of the request.
See ExtractFilterFromReq(IAppContext, HttpRequest, String, SavedFilter) for more information.
| |
ExtractFilterFromReq(IAppContext, HttpRequest, String) |
Extract any general filter clause from the named HTTP request parameter.
See ExtractFilterFromReq(IAppContext, HttpRequest, String, SavedFilter) for more information.
Note that calling this overload is the same as calling the ExtractFilterFromReq(IAppContext, HttpRequest)
overload specifying 'flt' as the name value.
| |
ExtractFilterFromReq(IAppContext, HttpRequest, String, SavedFilter) |
Extract any general filter clause from the request.
Use this method to obtain the filter clause and SavedFilter specified in the
request via the name (defaults to 'flt') parameter.
The value must be a special SavedFilter identifier generated using one of the
RegisterReqFilter(IAppContext, String) overloads.
If the parameter is not present, or its value is blank/null, a blank/null clause will be returned
and the returned filter will be null.
Remarks
In early version of the platform providing a raw SQL filter clause was allowed, but due to the
risk of SQL injection this is no longer supported and an error will be thrown if a non-blank/empty
parameter value is found that is not a recognized SavedFilter identifier.
| |
FilterSignature |
Formats a signature for use on a QueryString
| |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GenerateSubquery(String, DBMSType) |
Generate a subquery for this filter appropriate for use in a SQL IN clause.
| |
GenerateSubquery(String, DBMSType, String) |
Generate a subquery for this filter appropriate for use in a SQL IN clause.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetSchema |
Get relevant schema information from cache if already retrieved, else from the database.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Loaded |
Mark this filter as loaded from xot_saved_filters.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Open(IAppContext, String) | ||
Open(IAppContext, IDatabase, String) |
Opens the specified saved filter from the specified database and returns the SavedFilter object.
| |
RegisterReqFilter(IAppContext, String) |
Register a filter clause for use in a URL's flt parameter. Registration will cause a
SavedFilter to be created and written to the database. The method
returns a filter spec that can be included in a URL without risk of a SQL injection attack.
Filters created using this overload will always be marked as Temp with a default expiration
and will be restricted to the current user.
| |
RegisterReqFilter(IAppContext, String, NullableDateTime) |
Register a filter clause for use in a URL's flt parameter. Registration will cause a
SavedFilter to be created and written to the database. The method
returns a filter spec that can be included in a URL without risk of a SQL injection attack.
Filters created using this overload will always be marked as Temp with a default expiration
and will be restricted to the current user.
| |
RegisterReqFilter(IAppContext, String, String, String, String) |
Register a filter clause for use in a URL's flt parameter. Registration will cause a
SavedFilter to be created and written to the database. The method
returns a filter spec that can be included in a URL without risk of a SQL injection attack.
Filters created using this overload will always be marked as Temp with a default expiration
and will be restricted to the current user.
| |
RegisterReqFilter(IAppContext, String, FilterAttributes, String, String, String, NullableDateTime, String) |
Register a filter clause for use in a URL's flt parameter. Registration will cause a
SavedFilter to be created and written to the database. The method
returns a filter spec that can be included in a URL without risk of a SQL injection attack.
You can use one of the ExtractFilterFromReq(IAppContext, HttpRequest, String, SavedFilter) overloads to extract the filter.
| |
RegisterReqFilterUrl |
Register a filter clause for use in a URL's flt parameter. Registration will cause a
SavedFilter to be created and written to the database. The method
returns a filter spec that can be included in a URL without risk of a SQL injection attack.
Filters created using this overload will always be marked as Temp with a default expiration
and will be restricted to the current user.
| |
Save |
Save the filter to the xot_saved_filters table in the operational database saving any static filter keys as well.
| |
Signature |
Returns a QueryString signature for the saved filter.
| |
ToString | (Inherited from Object.) |
Name | Description | |
---|---|---|
EqualValue |
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.) |