Predictions 4.10.0.0

hirondelle.predict.pub.search
Class SearchCriteria

Object
  extended by hirondelle.predict.pub.search.SearchCriteria

public final class SearchCriteria
extends Object

Model object for user input of search criteria.

In this case, the getXXX methods are package-private.

The user enters dates only, without times. The underlying data, the creation date-time of the Prediction, carries both date and time. To account for this, the getFromDate() and getToDate() methods return DateTime objects that are coerced to specific times of day, using DateTime.getStartOfDay() and DateTime.getEndOfDay(), respectively.


Constructor Summary
SearchCriteria(SafeText aSearchText, SafeText aSearchStyle, DateTime aFromDate, DateTime aToDate)
          Full constructor.
 
Method Summary
 boolean equals(Object aThat)
           
(package private)  DateTime getFromDate()
          The date passed to the constructor, if any, but with time coerced to the start of the day.
(package private)  SearchStyle getSearchStyle()
           
(package private)  SafeText getSearchText()
           
(package private)  DateTime getToDate()
          The date passed to the constructor, if any, but with time coerced to the end of the day.
 int hashCode()
           
 String toString()
          Intended for debugging only.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SearchCriteria

public SearchCriteria(SafeText aSearchText,
                      SafeText aSearchStyle,
                      DateTime aFromDate,
                      DateTime aToDate)
               throws ModelCtorException
Full constructor.

The dates can occur in any combination. If both the From-Date and To-Date are present, however, then the From-Date can never come after the To-Date.

No checks are made for 'future dates'.

Parameters:
aSearchText - number of characters in range 2..255 (required)
aSearchStyle - required
aFromDate - minimum creation date, must never be after aToDate (optional)
aToDate - maximum creation date (optional)
Throws:
ModelCtorException
Method Detail

getSearchText

SafeText getSearchText()

getFromDate

DateTime getFromDate()
The date passed to the constructor, if any, but with time coerced to the start of the day.


getToDate

DateTime getToDate()
The date passed to the constructor, if any, but with time coerced to the end of the day.


getSearchStyle

SearchStyle getSearchStyle()

toString

public String toString()
Intended for debugging only.

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

Predictions 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.27