Develop > Business logic layer > Developing the business logic layer using the BOD command framework > Developing BOD Get services


Create a search expression

Create a new search expression highlights the customization benefits of the BOD programming model - no Java code changes are required.

The search is defined using XPath expressions and query templates in the Data Service Layer. The client of the Web service can then call the service using the new XPath expression, and new SQL is called in the persistence layer.

To create a new search expression in the service:


Procedure

  1. Define the XPath expression to represent the search expression query.

    When you use the XPath language, the XPath should match the logical schema of the response Noun.

    See WebSphere Commerce extended XPath notation for a list of sample XPath expressions.

    Tip:

    • Optional items enclosed in square brackets. For example, ['<PredicateExpr']

    • Items repeating 0 or more times are suffixed with an asterisk.

    • Items repeating 1 or more times are followed by a '+'

    • Alternative choices in a production are separated by the ‘|' symbol. For example, <Alternative A>|<Alternative B>.

    • Where items need to be grouped they are enclosed in simple parenthesis ().

  2. Map the XPath expression to the SQL required.


Related concepts

Business Object Document Get processing pattern

XPath expressions


+

Search Tips   |   Advanced Search