You can define a named query in an <item-descriptor> element in an SQL repository definition file. A named query is defined in a <named-query> element. For example, given the following RQL query:

lastName ENDS WITH "son"

you can define a named query as follows:

<item-descriptor name=...>
       <rql>lastName ENDS WITH "son"</rql>

You can also create a named query with Java code, as described in the next section.

loading table of contents...