|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.internet2.middleware.grouper.internal.dao.QueryOptions
public class QueryOptions
options on a query (e.g. sorting, paging, total result size, etc) Sorting example: queryOptions = new QueryOptions().sortAsc("m.subjectIdDb"); Set<Member> members = group.getImmediateMembers(field, queryOptions); Paging example: QueryPaging queryPaging = new QueryPaging(); queryPaging.setPageSize(pageSize); queryPaging.setPageNumber(pageNumberOneIndexed); -or- queryPaging.setFirstIndexOnPage(startZeroIndexed); queryOptions = new QueryOptions().paging(queryPaging); Set<Member> members = group.getImmediateMembers(field, queryOptions); Query count example: QueryOptions queryOptions = new QueryOptions().retrieveCount(true).retrieveResults(false); group.getImmediateMembers(field, queryOptions); int totalSize = queryOptions.getCount().intValue();
Constructor Summary | |
---|---|
QueryOptions()
|
Method Summary | |
---|---|
static QueryOptions |
create(String sortString,
Boolean ascending,
Integer pageNumber,
Integer pageSize)
|
Long |
getCount()
count of the query if it is being calculated. |
QueryPaging |
getQueryPaging()
If this is a paged query, and what are specs |
QuerySort |
getQuerySort()
if this query is sorted (by options), and what the col(s) are |
Boolean |
getSecondLevelCache()
|
String |
getSecondLevelCacheRegion()
|
static void |
initTotalCount(QueryOptions queryOptions)
|
boolean |
isRetrieveCount()
If the count of the query should be retrieved (sometimes paging will get the count) default to false |
boolean |
isRetrieveResults()
If the results should be retrieved (generally only false for size queries). |
QueryOptions |
paging(int pageSize,
int pageNumber,
boolean doTotalCount)
factory for query paging |
QueryOptions |
paging(QueryPaging queryPaging1)
If this is a paged query, and what are specs |
QueryOptions |
retrieveCount(boolean retrieveCount1)
If the count of the query should be retrieved (sometimes paging will get the count) default to false |
QueryOptions |
retrieveResults(boolean retrieveResults1)
If the results should be retrieved (generally only false for size queries). |
QueryOptions |
secondLevelCache(boolean secondLevelCache1)
|
QueryOptions |
secondLevelCacheRegion(String secondLevelCacheRegion1)
|
void |
setCount(Long count1)
count of the query if it is being calculated. |
QueryOptions |
sort(QuerySort querySort1)
if this query is sorted (by options), and what the col(s) are |
QueryOptions |
sortAsc(String field)
sort ascending on this field |
QueryOptions |
sortDesc(String field)
sort ascending on this field |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QueryOptions()
Method Detail |
---|
public static void initTotalCount(QueryOptions queryOptions)
queryOptions
- public static QueryOptions create(String sortString, Boolean ascending, Integer pageNumber, Integer pageSize)
sortString
- ascending
- pageNumber
- 1 indexed page numberpageSize
-
public QueryOptions secondLevelCache(boolean secondLevelCache1)
secondLevelCache1
-
public Boolean getSecondLevelCache()
public QueryOptions secondLevelCacheRegion(String secondLevelCacheRegion1)
secondLevelCacheRegion1
-
public String getSecondLevelCacheRegion()
public String toString()
toString
in class Object
Object.toString()
public QuerySort getQuerySort()
public QueryOptions sort(QuerySort querySort1)
querySort1
-
public QueryPaging getQueryPaging()
public QueryOptions sortAsc(String field)
field
-
public QueryOptions paging(int pageSize, int pageNumber, boolean doTotalCount)
pageSize
- pageNumber
- 1 indexed page numberdoTotalCount
- true to do total count, false to not
public QueryOptions sortDesc(String field)
field
-
public QueryOptions paging(QueryPaging queryPaging1)
queryPaging1
-
public boolean isRetrieveResults()
public QueryOptions retrieveResults(boolean retrieveResults1)
retrieveResults1
-
public boolean isRetrieveCount()
public QueryOptions retrieveCount(boolean retrieveCount1)
retrieveCount1
-
public Long getCount()
public void setCount(Long count1)
count1
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |