Fish & Chips Club 4.10.0.0

hirondelle.fish.main.search
Class RestoSearchAction

Object
  extended by ActionImpl
      extended by ActionTemplateSearch
          extended by hirondelle.fish.main.search.RestoSearchAction
All Implemented Interfaces:
Action

public final class RestoSearchAction
extends ActionTemplateSearch

Search for Restos by name.

There are two search criteria, one on name, and one on price.

As well, the sort order of the listing may also be reversed.

Implementation Note:
The WHERE and ORDER BY clauses of the SQL statement are dynamically generated using DynamicSql.

View : SQL Statements :

Field Summary
static RequestParameter MAX_PRICE
           
static RequestParameter MIN_PRICE
           
static RequestParameter ORDER_BY
           
static SqlId RESTO_DYNAMIC_SEARCH
           
static RequestParameter REVERSE_SORT
           
static RequestParameter STARTS_WITH
           
 
Fields inherited from class ActionTemplateSearch
SUPPORTED_OPERATION
 
Fields inherited from class ActionImpl
DATA, ERRORS, ITEM_FOR_EDIT, ITEMS_FOR_LISTING, MESSAGES, USER_ID
 
Constructor Summary
RestoSearchAction(RequestParser aRequestParser)
          Constructor.
 
Method Summary
protected  void listSearchResults()
          Fetch the records consistent with input criteria, and display the result.
protected  void validateUserInput()
          Ensure the user input can build a RestoSearchCriteria.
 
Methods inherited from class ActionTemplateSearch
execute
 
Methods inherited from class ActionImpl
addError, addError, addError, addMessage, addMessage, addToRequest, addToSession, copyFromSessionToRequest, createSessionAndCsrfToken, endSession, getErrors, getExistingSession, getFromSession, getIdParam, getIdParams, getLocale, getLoggedInUserName, getMessages, getOperation, getOrderBy, getParam, getParamUnsafe, getRequestParser, getResponsePage, getTimeZone, getUserId, hasErrors, removeFromSession, setResponsePage
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STARTS_WITH

public static final RequestParameter STARTS_WITH

REVERSE_SORT

public static final RequestParameter REVERSE_SORT

MIN_PRICE

public static final RequestParameter MIN_PRICE

MAX_PRICE

public static final RequestParameter MAX_PRICE

ORDER_BY

public static final RequestParameter ORDER_BY

RESTO_DYNAMIC_SEARCH

public static final SqlId RESTO_DYNAMIC_SEARCH
Constructor Detail

RestoSearchAction

public RestoSearchAction(RequestParser aRequestParser)
Constructor.

Method Detail

validateUserInput

protected void validateUserInput()
                          throws AppException
Ensure the user input can build a RestoSearchCriteria.

The end user may input criteria on name, price or both. The ORDER_BY parameter is always submitted, since there is no 'blank' value in the SELECT control.

Specified by:
validateUserInput in class ActionTemplateSearch
Throws:
AppException

listSearchResults

protected void listSearchResults()
                          throws AppException
Fetch the records consistent with input criteria, and display the result.

Specified by:
listSearchResults in class ActionTemplateSearch
Throws:
AppException

Fish & Chips Club 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.26