public class SearchCriteriaTo extends AbstractTo
transfer-object with the
criteria for a search and pagination query. Such object specifies the criteria selecting which hits will match when
performing a search.SearchCriteriaTo to create a java bean with all the fields for your search.| Modifier and Type | Field and Description |
|---|---|
private PaginationTo |
pagination |
private Integer |
searchTimeout |
private static long |
serialVersionUID
UID for serialization.
|
private List<OrderByTo> |
sort |
| Constructor and Description |
|---|
SearchCriteriaTo()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
PaginationTo |
getPagination()
The currently active pagination.
|
Integer |
getSearchTimeout()
This method gets the maximum delay in milliseconds the search may last until it is canceled.
|
List<OrderByTo> |
getSort() |
void |
limitMaximumPageSize(int limit)
Limits the
page size by the given limit. |
void |
setPagination(PaginationTo pagination) |
void |
setSearchTimeout(int searchTimeout) |
void |
setSort(List<OrderByTo> sort) |
toString, toStringprivate static final long serialVersionUID
private PaginationTo pagination
getPagination()private Integer searchTimeout
getSearchTimeoutpublic PaginationTo getPagination()
PaginationTo.NO_PAGINATION if no specific pagination
has been set. Will never return null.public void setPagination(PaginationTo pagination)
pagination - the pagination to setpublic void limitMaximumPageSize(int limit)
page size by the given limit.
If currently no pagination is active, or the current page size is null or
greater than the given limit, the value is replaced by limit
limit - is the maximum allowed value for the page size.public Integer getSearchTimeout()
"javax.persistence.query.timeout" in JPA.null for NO timeout.public void setSearchTimeout(int searchTimeout)
searchTimeout - is the new value of getSearchTimeout().Copyright © 2014–2016 OASP-Team. All rights reserved.