Creating a Query
A query allows the user to retrieve data based on specific selection criteria. In the example, you create a query that will be fired when an Order long text is entered as search string on the UI. This string is be compared by the LIKE operator to the long text of all orders available on the device and the query returns a collection of type OrderHeader.
You have created service orderService.
1. Select the Services → orderSerivce node, open the context menu (by right-clicking on the node), and choose Open → Edit Service.
2. On the Operations tab page, choose Add.
3. In the Create New Operation dialog box, choose Query, enter Name getOrderByLongText, and click Next.
4. In the Query Operation Designer, choose Add Input.
5. In the dialog box, choose Add, enter Name longtext, select Type java.lang.String, and choose OK.
6. Choose Add Output, select OrderOrderheader, and choose OK.
7. Choose Add Filters and maintain the following data:
OrderOrderheader.Longtext LIKE longtext.
8. Choose OK to close the Add Filters dialog box.
9. Choose Finish.
You have created a query operation, which appears in the Operations tab page.