Fish & Chips Club 4.10.0.0

hirondelle.fish.main.search
Class RestoSearchCriteria

Object
  extended by hirondelle.fish.main.search.RestoSearchCriteria

public final class RestoSearchCriteria
extends Object

Model Object for a search on a restaurant.

This Model Object is a bit unusual since its data is never persisted, and no such objects are returned by a DAO. It exists for these reasons :

Design Note
This class is different from the usual Model Object. Its getXXX methods are package-private, since it is used only by RestoSearchAction, and not in a JSP.


Nested Class Summary
(package private) static class RestoSearchCriteria.SortColumn
           
 
Field Summary
(package private) static int MAX_LENGTH
          Value 20 - maximum length of the input restaurant name.
(package private) static String WILDCARD
          Value "%" - SQL wildcard character, not permitted as part of input user name.
 
Constructor Summary
RestoSearchCriteria(SafeText aStartsWith, Decimal aMinPrice, Decimal aMaxPrice, SafeText aOrderBy, Boolean aIsReverseOrder)
          Constructor.
 
Method Summary
 boolean equals(Object aThat)
           
(package private)  Decimal getMaxPrice()
           
(package private)  Decimal getMinPrice()
           
(package private)  RestoSearchCriteria.SortColumn getOrderBy()
           
(package private)  SafeText getStartsWith()
          Return user input for Starts With, concatenated with WILDCARD.
 int hashCode()
           
(package private)  Boolean isReverseOrder()
           
 String toString()
           
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

WILDCARD

static final String WILDCARD
Value "%" - SQL wildcard character, not permitted as part of input user name.

See Also:
Constant Field Values

MAX_LENGTH

static final int MAX_LENGTH
Value 20 - maximum length of the input restaurant name.

See Also:
Constant Field Values
Constructor Detail

RestoSearchCriteria

public RestoSearchCriteria(SafeText aStartsWith,
                           Decimal aMinPrice,
                           Decimal aMaxPrice,
                           SafeText aOrderBy,
                           Boolean aIsReverseOrder)
                    throws ModelCtorException
Constructor.

At least one criterion must be entered, on either the name, or the price range. When a price is specified, both minimum and maximum must be included. Some restaurants do not have an associated price. Such records will NOT be retrieved.

Parameters:
aStartsWith - (optional) first few letters of the restaurant name. Cannot be longer than MAX_LENGTH characters. Cannot contain the WILDCARD character.
aMinPrice - (optional) minumum price for the cost of lunch, in the range 0.00..100.00. Must be less than or equal to aMaxPrice, 2 decimals.
aMaxPrice - (optional) minumum price for the cost of lunch, in the range 0.00..100.00, 2 decimals.
aOrderBy - (optional) is converted internally into an element of the RestoSearchCriteria.SortColumn enumeration.
aIsReverseOrder - (optional) toggles the sort order, ASC versus DESC.
Throws:
ModelCtorException
Method Detail

getStartsWith

SafeText getStartsWith()
Return user input for Starts With, concatenated with WILDCARD.

If the user has not entered any Starts With criterion, then return null.


getMinPrice

Decimal getMinPrice()

getMaxPrice

Decimal getMaxPrice()

getOrderBy

RestoSearchCriteria.SortColumn getOrderBy()

isReverseOrder

Boolean isReverseOrder()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object aThat)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Fish & Chips Club 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.26