| Restriction |
A simple bean which defines a restriction in a search, this is like saying:
where userId = '123'; OR where userId like '%aaronz%';
Example usage:
Restriction rteq = new Restriction("title", curTitle); // restrict search to title equals value of curTitle
Restriction rtne = new Restriction("title", curTitle, Restriction.NOT_EQUALS); // restrict search to title not equals value of curTitle
|
| Search |
This is a simple class which allows the passing of a set of search parameters in a nice way
Example usage:
Search s1 = new Search("title", curTitle); // search where title equals value of curTitle
Search s2 = new Search("title", curTitle, Restriction.NOT_EQUALS); // search where title not equals value of curTitle
Search s2 = new Search(
new Restriction("title", curTitle),
new Order("title")
); // search where title equals value of curTitle and order is by title ascending
Most searches can be modeled this way fairly easily.
|