Query Method

The Query method is called when a search is performed. The Query method must be supported by every VBC. Each record that matches the query is represented as a property set. For example, if 5 records match the query, then there will be 5 child property sets. Each property set contains a list of field names, that is field value pairs representing the values of each field for that particular record. The following figure illustrates the property set for the Query input and is followed by its XML representation.


Query Input Property Set: This image is described in the surrounding text.

The following is the XML representation of the property set shown in the previous figure:

<?xml version="1.0" encoding="UTF-8" ?> 
<?Siebel-Property-Set EscapeNames="true"?> 
<PropertySet
	max-rows="6"
	search-string="([Phone] IS NOT NULL) AND ([AccountId] = "1-6")"
	Business_spcComponent_spcId="1" 
	Business_spcComponent_spcName="Contact">
	<PropertySet AccountId="1-6" /> 
		<search-spec>
  			<node node-type="Binary Operator">AND 
  			<node node-type="Unary Operator">IS NOT NULL 
  			<node node-type="Identifier">Phone</node> 
  			  </node>
   			 <node node-type="Binary Operator">= 
   			 <node node-type="Identifier">AccountId</node> 
   			 <node value-type="TEXT" node-type="Constant">1-6</node> 
    		</node>
  	</node>
</search-spec>
<sort-spec>
  		<sort field="Location">ASCENDING</sort> 
  		<sort field="Name">DESCENDING</sort> 
	</sort-spec>
</PropertySet>

The following figure illustrates the property set for the Query output.

Query Output Property Set: This image is described in the surrounding text.

The following is the XML representation of the property set shown in the previous figure:

<?xml version="1.0" encoding="UTF-8" ?> 
<?Siebel-Property-Set EscapeNames="true"?> 
<PropertySet>
	<PropertySet 
		AccountId="1-6"
		Name="Sara Chen"
		Phone="(415)298-7890" 
		Location="San Francisco"
		AccessId="128" /> 
<PropertySet 
		AccountId="1-6"
		Name="Eric Brown"
		Phone="(650)123-1000" 
		Location="Palo Alto"
		AccessId="129" /> 
</PropertySet>