public final class Query extends Object
Projection,
Filter,
SortDirection| Constructor and Description |
|---|
Query() |
| Modifier and Type | Method and Description |
|---|---|
Query |
addSort(String propertyName,
SortDirection sortDirection)
Adds sort for the specified property with the specified direction.
|
boolean |
equals(Object o) |
int |
getCurrentPageNum()
Gets the current page number.
|
Filter |
getFilter()
Gets the filter.
|
Integer |
getPageCount()
Gets the page count.
|
int |
getPageSize()
Sets the page size.
|
List<Projection> |
getProjections()
Get the SELECT projections.
|
Map<String,SortDirection> |
getSorts()
Gets the sorts.
|
int |
hashCode() |
boolean |
isDebug()
Checks whether is debug.
|
Query |
select(String propertyName,
String... propertyNames)
Set SELECT projections.
|
Query |
setCurrentPageNum(int currentPageNum)
Sets the current page number with the specified current page number.
|
Query |
setDebug(boolean debug)
Sets the debug flag.
|
Query |
setFilter(Filter filter)
Sets the filter with the specified filter.
|
Query |
setPage(int currentPageNum,
int pageSize)
Sets the current page number and page size with the specified current page number and the specified page sieze.
|
Query |
setPageCount(int pageCount)
Sets the page count with the specified page count.
|
Query |
setPageSize(int pageSize)
Sets the page size with the specified page size.
|
String |
toString() |
public Query setPage(int currentPageNum, int pageSize)
currentPageNum - the specified current page numberpageSize - the specified page sizepublic boolean isDebug()
true if it is, returns false otherwisepublic Query setDebug(boolean debug)
debug - the specified debug flagpublic Query select(String propertyName, String... propertyNames)
propertyName - the specified property namepropertyNames - the specified other property namespublic List<Projection> getProjections()
public Query addSort(String propertyName, SortDirection sortDirection)
propertyName - the specified property name to sortsortDirection - the specified sortpublic Query setFilter(Filter filter)
filter - the specified filterpublic Filter getFilter()
public int getCurrentPageNum()
Note: The default value of the current page number is @code -1}.
public Query setCurrentPageNum(int currentPageNum)
currentPageNum - the specified current page numberpublic int getPageSize()
Note: The default value of the page size -1.
public Query setPageSize(int pageSize)
pageSize - the specified page sizepublic Map<String,SortDirection> getSorts()
public Integer getPageCount()
public Query setPageCount(int pageCount)
pageCount - the specified page countCopyright © 2009–2019 B3log. All rights reserved.