Search Specification

You can use the searchspec attribute on a component instance for complicated queries.

For example, query by example (QBE) uses AND as the implicit operator between fields. You could implement OR semantics by using multiple integration component instances, but this would result in a query for each integration component instance and might result in duplicate records being returned. Using the searchspec attribute could avoid this problem.

The syntax for the searchspec attribute is as follows:

  • Expression: Expression [Binary Operator Expression]

  • Expression: [Field XML tag] Operator 'Value'

  • Expression: (Expression)

    Note: Parentheses can be nested.
  • Expression: [Field XML tag] IS NULL | [Field XML tag] IS NOT NULL

  • Expression: EXISTS(Expression) | NOT EXISTS(Expression)

    Note: In EXISTS and NOT EXISTS expressions, use the business component field names of multivalue group (MVG) fields, not the integration component XML tag names.
  • Operator: = | ~= | < | <= | > | >= | <> | LIKE | ~LIKE

  • Binary Operator: AND | OR

The EAI UI Data Adapter parses the searchspec (unlike the EAI Siebel Adapter) and performs the following operations before setting the search specification on the business component:

  • Converts Field XML tags into business component field names. For example, assume two business component fields, First Name and Last Name, have XML tags FirstName and LastName respectively. The EAI UI Data Adapter converts the XML tags as shown in the following table.

This Search Spec Will be converted to this
[FirstName] LIKE '*Jon*' AND 
[LastName] = 'Doe'
[First Name] LIKE '*Jon*' AND [Last 
Name] = 'Doe'
[FirstName] LIKE '*Jon*' OR 
[LastName] LIKE 'Doe*'
[First Name] LIKE '*Jon*' OR [Last 
Name] LIKE 'Doe'

For more information about query language, see Siebel Developer's Reference.

Example of Using the searchspec Attribute

This example demonstrates using the searchspec attribute for the QueryPage method.

<SiebelMessage MessageType="Integration Object" IntObjectName="Account" 
IntObjectFormat="Siebel Hierarchical">
   <ListOfAccount>
      <Account>
         <Id>2-1111</Id>
         <ListOfContact pagesize="10" startrownum="0">
            <Contact searchspec="[FirstName]  LIKE  '*Jon*' AND [LastName] = 'Doe'">
               <FirstName></FirstName>
               <LastName></LastName>
            </Contact>
         </ListOfContact>
      </Account>
   </ListOfAccount>
</SiebelMessage>