SimpleFilterObject

From IQsimWiki

Jump to: navigation, search

Filter Mechanism

Description

For some of the "getXIQS … List", a filter mechanism can be applied to reduce the list of results or reorganize the output order (sort parameter).
This parameter object can be placed anywhere in the command and is always optional.

  1. Simplefilter object
    It takes the form of an XML structure with the following fields:
    • "start" : in the whole possible results, starts output list at specified index.
    • "limit" : limit the output list to the specified number of objects.
    • "DIR" : when a sorting order is specified, defines the direction order. Only two values are accepted => "ASC" : ascending order, "DESC" : descending order.
    • "SORT" : specifies the output list must respect the specified sorting order.
    • "query" : limit output by applying a filter on underlying requested results.
  2. Complexfilter object
    It takes the form of an XML structure with the following fields:
    • "id" : specify which predefined user filter object should be used to filter output. This ID refers to an existing complexfilter object in DB.
    • "start" : in the whole possible results, starts output list at specified index.
    • "limit" : limit the output list to the specified number of objects.
    • "DIR" : when a sorting order is specified, defines the direction order. Only two values are accepted => "ASC" : ascending order, "DESC" : descending order.
    • "SORT" : specifies the output list must respect the specified sorting order.


Here is a demo sample of a simple filter applied on the GSM Operator List:

<?xml version="1.0" encoding="UTF-8"?>
<command name="getXIQSGsmOperatorList">
<simplefilter>
<start>11</start>
<limit>20</limit>
<DIR>ASC</DIR>
<SORT>name</SORT>
<query>countrycode>100</query>
</simplefilter>
</command>

This sample command will return a list of GSM operator starting at the 11th position in result list, limited to 20 result objects, ordered on the GSM operator's name in the ascending order, and where the GSM operator's country code is greater than 100.


Here is a demo sample of a complex filter applied on the GSM Operator List:

<?xml version="1.0" encoding="UTF-8"?>
<command name="getXIQSGsmOperatorList">
<complexfilter>
<id>23</id>
<start>11</start>
<limit>20</limit>
<DIR>ASC</DIR>
<SORT>name</SORT>
</complexfilter>
</command>

This sample command will return a list of GSM operator starting at the 11th position in result list, limited to 20 result objects, ordered on the GSM operator's name in the ascending order, all this while applying an existing db filter object of id 23.

See Also

createXIQSUserFilter

Personal tools
Namespaces
Variants
Views
Actions
Navigation
XIQS XML Protocol
XIQS Framework Libraries
XIQS Command List