Siebel Order Management Infrastructure Guide > Projected Asset Cache > Projected Asset Cache Business Service Methods >

Query Method


The Query method filters the list of components in the Projected Asset Cache to those that match the Search Expression. It then counts the number of components, sums the values of Aggregate Field, or calculates the minimum, maximum or average for each unique combination of group-by fields, and sorts the result by the Sort Field. This method is analogous to a SQL SELECT statement of the form:

SELECT * | COUNT(*) | SUM([Aggregate Field]) | MAX([Aggregate Field]) | MIN([Aggregate Field]) | AVG([Aggregate Field]), [Calculated Field] WHERE [Search Expression] GROUP BY [Group By Field] HAVING [Having Expression] SORT BY [Sort By Field]"

The search expression supports a list of AND clauses and OR clauses with the following operators: =, <>, !=, <, >, >=, <=.

Arguments
  • Asset Cache Key: [in] Unique identifier with which to query the cache. The key identifies the projected asset cache to validate, and it is returned by the Initialize method. (Required)
  • Search Expression: [in] Consider only assets that satisfy this Boolean expression. (Optional)

    Example:

    ([Product Type] = "Connection") AND ( ([Service Address] = "") OR ([To Service Address] = ""))

  • Aggregate Function: [in] The type of query executed against the projected asset cache. Valid values are Sum, Count, Max, Min, Avg or "" (Optional).
  • Aggregate Field: [in] The asset field considered by an aggregate query. Example: Bandwidth. (Optional)
  • Calculated Field: [in] Unique identifier with which to query the cache. This key is returned by the Initialize method. The Calculated Field consists of a property set containing definitions for calculated fields that are returned as part of the result set. (Optional)

    Example:

    {'Error Text', '[Count] [Product]s have no Service Address selected'}

  • Group By Field: [in] A property set containing a comma-separated list of fields or attributes used to group by when evaluating an aggregate function. (Optional)

    Example:

    {'Service Address', ''},{'To Service Address', ''}

  • Having Expression: [in] Consider only groups that satisfy this Boolean expression. (Optional)

    Example:

    [Count] > 1

  • Sort By Field: [in] A property set containing a comma-separated list of fields by which to sort the result set. (Optional)

    Example:

    {'Product', ''},{'Service Id', ''}

  • Result: [out] Property set of projected asset cache entries that satisfy the search expression. The property set contains child property sets that represent rows of the result.

    Example:

    {{{'Count', '2'}, {'Service Address', '50 Main St., Denver, CO 80207'}, {'To Service Address', '101 California, New York NY 10234'}},

    {{'Count', '4'}, {'Service Address', '50 Main St., Denver, CO 80207'}, {'To Service Address', '901 Peach Tree, Atlanta, GA 98765'}}}

See Also

See the following methods:

Siebel Order Management Infrastructure Guide Copyright © 2008, Oracle and/or its affiliates. All rights reserved. Legal Notices.