public class SearchOptionsBuilder extends Object
SearchOptions for deeper details on search mechanism options.SearchOptions| Constructor and Description |
|---|
SearchOptionsBuilder(int startIndex,
int maxResults)
Builds a new
SearchOptions with results limited to startIndex and maxResults |
SearchOptionsBuilder(SearchOptions searchOptions)
Creates a new
SearchOptionsBuilder from another instance by |
public SearchOptionsBuilder(int startIndex,
int maxResults)
SearchOptions with results limited to startIndex and maxResultsstartIndex - the first result to returnmaxResults - the maximum results to return. The actual number can be smaller, if the end of the list has been reached.public SearchOptionsBuilder(SearchOptions searchOptions)
SearchOptionsBuilder from another instance bysearchOptions - public SearchOptionsBuilder filter(String field, Serializable value)
field - the field name to filtervalue - the single value to filter on that field namepublic SearchOptionsBuilder greaterThan(String field, Serializable value)
field - the field name to compare to.value - the value to compare.public SearchOptionsBuilder greaterOrEquals(String field, Serializable value)
field - value - public SearchOptionsBuilder lessThan(String field, Serializable value)
field - value - public SearchOptionsBuilder lessOrEquals(String field, Serializable value)
field - value - public SearchOptionsBuilder between(String field, Serializable from, Serializable to)
field - from - to - public SearchOptionsBuilder differentFrom(String field, Serializable value)
field - value - public SearchOptionsBuilder or()
public SearchOptionsBuilder and()
public SearchOptionsBuilder searchTerm(String value)
value - public SearchOptionsBuilder sort(String field, Order order)
field - the field name to sort byorder - the order of the sort (ASCENDING, DESCENDING)public SearchOptionsBuilder setFilters(List<SearchFilter> filters)
filters - public SearchOptionsBuilder setSort(List<Sort> sorts)
sorts - public SearchOptions done()
SearchOptions finally built using this builder.Copyright © 2013 BonitaSoft. All Rights Reserved.