14.01.2013 Views

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Note the searchBinding managed property; this property “injects” the ADF Model<br />

action binding that is used to call the advancedSearch() method on<br />

JhsApplicationModuleImpl (see below).<br />

Both the Quick Search Go button and the Advanced Search Find button call a method on<br />

the search bean:<br />

<br />

<br />

Internally, the quickSearch() and advancedSearch() methods delegate the actual work<br />

to methods createArgumentListForAdvancedSearch() and<br />

executeAdvancedSearchBinding().<br />

7.2.6.2. Search Support in ADF BC Application Module<br />

<strong>JHeadstart</strong> Runtime provides an extension for your Application Module that includes<br />

advanced search support (which is used for both the Advanced Search and the Quick<br />

Search functionality of <strong>JHeadstart</strong>). The JhsApplicationModule interface and the<br />

JhsApplicationModuleImpl class contain the method advancedSearch() that takes an<br />

array of <strong>JHeadstart</strong> QueryCondition objects and translates them to an additional where<br />

clause on the relevant View Object.<br />

This method is exported in the client interface of the Application Module, which makes it<br />

available as a data control operation. For such an operation an action binding can then be<br />

created in the page definition of the page (which is of course what the <strong>JHeadstart</strong><br />

Application Generator does when a Search Region is generated).<br />

The QueryCondition object stores information about that part of the search that applies<br />

to a single view attribute:<br />

• attribute to search on<br />

• operator to use<br />

• search value<br />

• format<br />

• wildcard usage<br />

• case (in)sensitivity<br />

The QueryCondition also translates the query operator names used in the pages by<br />

appropriate SQL operators and wildcard usage. For example, query operator<br />

"startsWith" results in the operator "like" and wildcard usage "suffix".<br />

The advancedSearch() method uses this information to construct ADF BC<br />

ViewCriteria objects, applies them to the View Object, and then executes the (modified)<br />

query of the View Object.<br />

Reference: See the Javadoc or source of the advancedSearch() method of<br />

JhsApplicationModule and JhsApplicationModuleImpl, and the Javadoc of<br />

the QueryModel class.<br />

<strong>JHeadstart</strong> Developer’s <strong>Guide</strong> Generating Query Behaviors 7 - 13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!