Opalis Quick Integration Kit 3.0
The IFilterCriteria interface provides programmatic access to a single filter condition.

Namespace:  Opalis.QuickIntegrationKit
Assembly:  Opalis.QuickIntegrationKit(in Opalis.QuickIntegrationKit.dll) Version: 3.0.0.0 (3.1.0.1)

Syntax

C#
public 
interface 
IFilterCriteria
Visual Basic (Declaration)
Public 
Interface 
IFilterCriteria
Visual C++
public 
interface class 
IFilterCriteria

Remarks

The IFilterCriteria interface will typically be used by those OpalisObject classes that require customized querying solutions beyond the filtering support provided by IOpalisRequest.

Examples

CopyC#
public SelectQuery
GetSelectQueryFrom(IOpalisRequest request)
{
	StringBuilder conditions = 
new StringBuilder();

foreach (IFilterCriteria
filter 
in request.Filters)
	{
	
if (conditions.Length != 
0)	 
			conditions.Append(
" AND "); 

		conditions.Append(filter.Name);

	
switch (filter.Relation)
		{
		 
case Relation.EqualTo:
				conditions.Append(
"=");
			
break;

		
case Relation.NotEqualTo:
				conditions.Append(
"<>");

		
// ...
	}

		conditions.AppendFormat(
"'{0}'",
filter.Value.AsString);
}


string className =
request.Inputs[
"Class Name"].AsString;

return
SelectQuery(className, conditions);
}

See Also