Show TOC Start of Content Area

Background documentation Query Editor Reference  Locate the document in its SAP Library structure

Queries in Mobile Service Components are modeled in the Query Editor, including input and output parameters as well as query operations, such as joins, filters, and sorting criteria.

Specifically, the Query Editor supports the following parameters:

Parameter

Values and Comments

Input

Input parameters are parameters that can be used as compare values for filters. When the query is later called in your Java code, you have to set the input parameter on the query object and then execute the query by calling it.

The Input parameter comprises a Name and a Type. It can be bidirectional or distinct:

      Bidirectional changes the behavior of the query result. If selected, iteration through the data is performed forwards and backwards. Note that performance may suffer.

      Depending on the condition, an SQL query can have more than one matching element in the result set. If Distinct is selected, the result is unique.

The type includes byte, byte [], short, int, long, float, double, char, boolean, as well as:

      java.lang.String

      java.sql.Date

      java.math.BigDecimal

      java.sql.Time

      java.lang.Long

Output

The Output parameter is a data object node or data structure. The query will return a collection of this type.

Joins

You can create inner joins on data object nodes. If associations have been created between the nodes on the Data Orchestration Engine (DOE), you can create a Join by Relation based on the association.

Alternatively, Custom Joins can be created, joining any data object nodes based on criteria that you define.

The following operators are supported as join conditions:

      = (equals)

      < (less than)

      <= (less than or equal to)

      > (greater than)

      >= (greater than or equal to)

      <> (less than or greater than)

      IN (contained in)

      NOT IN (not contained in)

      LIKE (wild-card operation)

Filters

Filters are the same as WHERE conditions in Structured Query Language (SQL). Any field of the output structure can be compared to an input parameter (for dynamic WHERE conditions) or to a static value that is entered as Custom Text.

The following operators can be employed in the filter:

      = (equals)

      < (less than)

      <= (less than or equal to)

      > (greater than)

      >= (greater than or equal to)

      <> (less than or greater than)

      IN (contained in)

      NOT IN (not contained in)

      LIKE (wild-card operation)

      CONTAINS (wild-card operation with % delimiters)

Sorting

A data object element (a single field) can be sorted according to the following criteria:

      ASCENDING

      DESCENDING

Multiple sort conditions can be defined.

 

End of Content Area