T - specifies the return type of the follwing methodspublic interface BaseQuery<T>
| Modifier and Type | Method and Description |
|---|---|
long |
count()
Counting the amount of rows/results for the current query.
|
List<T> |
list()
This method will return a list of defined
T objects. |
List<T> |
list(int offset,
int limit)
This method will return a list of defined
T objects with specified offset and an limit. |
default List<T> |
listPage(int pageNumber,
int pageSize)
This method will return all results for page X with a size of Y of the current query.
Negative pageNumber/size will be changed to 0 and the last page got maybe less elements. |
T |
single()
This method will return a single object of
T. |
List<T> list() throws NotAuthorizedException
T objects.NotAuthorizedException - if the user is not authorized to perform this queryList<T> list(int offset, int limit) throws NotAuthorizedException
T objects with specified offset and an limit.offset - index of the first element which should be returned.limit - number of elements which should be returned beginning with offset.NotAuthorizedException - if the user is not authorized to perform this querydefault List<T> listPage(int pageNumber, int pageSize) throws NotAuthorizedException
pageNumber - current pagination page starting at 0.pageSize - amount of elements for this page.NotAuthorizedException - if the user is not authorized to perform this queryT single() throws NotAuthorizedException
T.NotAuthorizedException - if the user is not authorized to perform this querylong count()
throws NotAuthorizedException
NotAuthorizedException - when permissions not granted.Copyright © 2018. All rights reserved.