public final class QueryHelper extends Object
Modifier and Type | Field and Description |
---|---|
static int |
NUMBER_MORE_PAGES
Number of pages that are shown (if available) after the current pages
|
Modifier and Type | Method and Description |
---|---|
static org.hibernate.Query |
getQuery(org.hibernate.Session session,
String mainQuery,
ResultSpecification filterSpecification,
Object... params)
Get a query
|
static <I> PageableList<I> |
queryAsPageableList(org.hibernate.Query query,
ResultSpecification resultSpecification,
boolean logPerformance)
Execute the query and also retrieve the overall count to successfully build the pageable list
|
public static final int NUMBER_MORE_PAGES
public static org.hibernate.Query getQuery(org.hibernate.Session session, String mainQuery, ResultSpecification filterSpecification, Object... params)
session
- the sessionmainQuery
- the main query stringfilterSpecification
- the filter specificationparams
- the parameterspublic static <I> PageableList<I> queryAsPageableList(org.hibernate.Query query, ResultSpecification resultSpecification, boolean logPerformance)
I
- the type of the item (anyway no check will be done)query
- the configured query to executeresultSpecification
- the ResultSpecification
containing offset and overall countlogPerformance
- true if the performance should be loggedCopyright © 2019 Communote team. All rights reserved.