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=...> ... <named-query> <rql-query> <query-name>myQuery</query-name> <rql>lastName ENDS WITH "son"</rql> </rql-query> </named-query> </item-descriptor>
You can also create a named query with Java code, as described in the next section.