SIFWorks ADK 2.0
Query Class
NamespacesEdustructures.SifWorksQuery

[This is preliminary documentation and is subject to change.]

Declaration Syntax
C#Visual BasicVisual C++
public sealed class Query
Public NotInheritable Class Query
public ref class Query sealed
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
QueryQueryNew(IElementDef)
Constructs a Query object with no initial conditions or field restrictions. If conditions are subsequently added to the Query, they will be evaluated as a group with the logical AND operator. To specify that the logical OR operator be used, call the form of constructor that accepts an alternate operator.

QueryQueryNew(IElementDef, GroupOperator)
Constructs a Query object with one ConditionGroup where all conditions in the group are evaluated using the supplied bool operator (either Condition.AND or Condition.OR). All Conditions subsequently added to this Query will be placed into the ConditionGroup created by the constructor. This constructor is provided as a convenience so that callers do not have to explicitly create a ConditionGroup for simple queries.

QueryQueryNew(IElementDef, ConditionGroup)
Constructs a Query object with a ConditionGroup.

QueryQueryNew(SIF_Query)
Constructs a Query object from a SIF_QueryObject. This constructor is not typically called by agents but is used internally by the class framework. The other constructors can be used to safely create Query instances to request a specific SIF Data Object. Use the addCondition and setFieldRestrictions methods to further define the conditions and SIF elements specified by the query.

AddCondition(IElementDef, ComparisonOperators, String)
Add a condition to this query.

AddCondition(IElementDef, ComparisonOperators, SifEnum)
AddCondition(String, ComparisonOperators, String)
Add a condition to this query. This form of the addCondition method is intended to be called internally by the Adk when parsing an incoming SIF_Query element. To ensure your code works with all versions of SIF, you should use the other form of this method that accepts an ElementDef constant for the field parameter whenever possible.

AddCondition(String, String, String)
Add a condition to this query. This form of the addCondition method is intended to be called internally by the Adk when parsing an incoming SIF_Query element. To ensure your code works with all versions of SIF, you should use the other form of this method that accepts an ElementDef constant for the field parameter whenever possible.

AddFieldRestriction(IElementDef)
Restricts the query to a specific field (i.e. element or attribute) of the data object being requested. If invoked, the results of the query will only contain the elements or attributes specified by the fields for which this method is called (call this method repeatedly for each field). Otherwise, the results will contain a complete object.

ConditionGroup
Sets the root ConditionGroup. By default a Query is constructed with a ConditionGroup to which individual conditions will be added by the addCondition methods. You can call this method to prepare a ConditionGroup ahead of time and replace the default with your own. Note calling this method after addCondition will replace any conditions previously added to the Query with the conditions in the supplied ConditionGroup.

Conditions
Gets the conditions placed on this query.

EffectiveVersion
From the list of SifVersions associated with this Query, returns the latest SifVersion supported by the current ADK instance.

Evaluate(SifDataObject)
Evaluate the given the SIFDataObject against the conditions provided in the Query. All conditions are evaluated using standard string comparisons using the Invariant Culture

Evaluate(SifDataObject, CultureInfo)
Evaluate the given the SIFDataObject against the conditions provided in the Query. All conditions are evaluated using the provided comparer

FieldRestrictions
Gets or sets the fields to include in the result of the query.

HasCondition(IElementDef)
Tests if this Query has a specific element or attribute condition

HasConditions()()
Determines if this Query has any conditions

HasFieldRestrictions()()
Determines if this Query has any field restrictions

ObjectTag
Gets the tag name of the object type being queried

ObjectType
Gets the object type being queried

RootConditionGroup
Gets the root ConditionGroup.

SifVersions
Gets or Sets the value of the SIF_Request/SIF_Version element. By default, this value is set to the version of SIF declared for the agent when the Adk was initialized.

ToXML()()
UserData
Gets and Sets custom state associated with this request. The state object used must be serializable and for performance reasons should be reasonably small.

Inheritance Hierarchy
Object
Query

Assembly: Edustructures.SifWorks.Adk (Module: Edustructures.SifWorks.Adk) Version: 2.0.0.10