|
Fish & Chips Club 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object hirondelle.fish.main.search.RestoSearchCriteria
public final class RestoSearchCriteria
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 |
---|
static final String WILDCARD
static final int MAX_LENGTH
Constructor Detail |
---|
public RestoSearchCriteria(SafeText aStartsWith, Decimal aMinPrice, Decimal aMaxPrice, SafeText aOrderBy, Boolean aIsReverseOrder) throws ModelCtorException
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.
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.
ModelCtorException
Method Detail |
---|
SafeText getStartsWith()
WILDCARD
.
If the user has not entered any Starts With criterion, then return null.
Decimal getMinPrice()
Decimal getMaxPrice()
RestoSearchCriteria.SortColumn getOrderBy()
Boolean isReverseOrder()
public String toString()
toString
in class Object
public boolean equals(Object aThat)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
Fish & Chips Club 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |