public class Search extends Object implements Serializable
PropertySearch
,
Serialized FormConstructor and Description |
---|
Search()
Constructs the search object with no parameters.
|
Search(SearchParameter[] parametersIn)
Constructs the search object.
|
Search(SearchParameter[] parametersIn,
boolean eagerFetchingIn)
Constructs the search object.
|
Search(SearchParameter[] parametersIn,
int pageNumberIn,
int pageSizeIn)
Constructs the search object.
|
Search(SearchParameter[] parametersIn,
int pageNumberIn,
int pageSizeIn,
boolean eagerFetchingIn)
Constructs the search object.
|
Modifier and Type | Method and Description |
---|---|
Search |
addOrderBy(String propertyName)
Adds an "order by" clause for the search with default ascending order.
|
Search |
addOrderBy(String propertyName,
boolean descending)
Adds an "order by" clause for the search.
|
Search |
addOrderBy(String propertyName,
int order)
Adds an "order by" clause for the search.
|
Search |
addSearchParameter(SearchParameter searchParameter)
Adds a search parameter to the search.
|
int |
getPageNumber()
Gets the page number (if paging the results).
|
int |
getPageSize()
Gets the size of the page (if paging the results).
|
SearchParameter[] |
getParameters()
Gets the search parameters for this search object..
|
boolean |
isEagerFetching()
Whether or not eager fetching is enabled (if it is enabled, all associations
queried will be fetched eagerly).
|
boolean |
isUseSqlLimiting()
Whether or not to use sql limiting (if paging is being used).
|
Search |
setEagerFetching(boolean eagerFetchingIn)
Sets whether or not eager fetching is enabled (if it is enabled, all associations
queried will be fetched eagerly).
|
Search |
setPageNumber(int pageNumberIn)
Sets the page number (if paging the results).
|
Search |
setPageSize(int pageSizeIn)
Sets the size of the page (if paging the results).
|
Search |
setParameters(SearchParameter[] parametersIn)
Sets the search parameters for this search object.
|
Search |
setUseSqlLimiting(boolean useSqlPaging)
Sets whether or not to use sql limiting (if paging is being used).
|
public Search(SearchParameter[] parametersIn, int pageNumberIn, int pageSizeIn, boolean eagerFetchingIn)
parametersIn
- the parameters to use.pageNumberIn
- the page number (if paging results).pageSizeIn
- the page size (if paging results).eagerFetchingIn
- whether or not the search will eagerly fetch the associations included in the search.public Search(SearchParameter[] parametersIn, int pageNumberIn, int pageSizeIn)
parametersIn
- the parameters to use.pageNumberIn
- the page number (if paging results).pageSizeIn
- the page size (if paging results).public Search(SearchParameter[] parametersIn)
parametersIn
- the parameters to use.public Search(SearchParameter[] parametersIn, boolean eagerFetchingIn)
parametersIn
- the parameters to use.eagerFetchingIn
- whether or not the search will eagerly fetch the associations included in the search.public Search()
public int getPageNumber()
public Search setPageNumber(int pageNumberIn)
pageNumberIn
- the page number (if paging results).public int getPageSize()
public Search setPageSize(int pageSizeIn)
pageSizeIn
- the page size.public SearchParameter[] getParameters()
public Search setParameters(SearchParameter[] parametersIn)
parametersIn
- public Search addSearchParameter(SearchParameter searchParameter)
searchParameter
- the search parameter to add.public boolean isEagerFetching()
public Search setEagerFetching(boolean eagerFetchingIn)
eagerFetchingIn
- whether or not to eager fetch the results.public Search addOrderBy(String propertyName)
propertyName
- the property name to order by.public Search addOrderBy(String propertyName, int order)
propertyName
- the property name to order by.order
- the order. Use: SearchParameter.ORDER_ASC
,
SearchParameter.ORDER_DESC
, or SearchParameter.ORDER_UNSET
.public Search addOrderBy(String propertyName, boolean descending)
propertyName
- the property name to order by.descending
- true/false; true for descending ordering, false for ascending ordering.public boolean isUseSqlLimiting()
public Search setUseSqlLimiting(boolean useSqlPaging)
useSqlPaging
- whether or not to use SQL paging (default is false
).Copyright © 2012–2014 IFREMER. All rights reserved.