T
- The query result typepublic interface PaginatedCriteriaBuilder<T> extends QueryBuilder<T,PaginatedCriteriaBuilder<T>>
Modifier and Type | Method and Description |
---|---|
PaginatedCriteriaBuilder<T> |
from(Class<?> entityClass)
Like
BaseQueryBuilder.from(java.lang.Class, java.lang.String) with the
alias equivalent to the camel cased result of what Class.getSimpleName() of the entity class returns. |
PaginatedCriteriaBuilder<T> |
from(Class<?> entityClass,
String alias)
Sets the entity class on which the query should be based on with the given alias.
|
String |
getPageCountQueryString()
Returns the query string that selects the count of elements.
|
String |
getPageIdQueryString()
Returns the query string that selects the id of the elements.
|
PagedList<T> |
getResultList()
Execute the query and return the result as a type List.
|
boolean |
isKeysetExtraction()
Returns whether keyset extraction is enabled or not.
|
PaginatedCriteriaBuilder<T> |
select(String expression)
Adds a select clause with the given expression to the query.
|
PaginatedCriteriaBuilder<T> |
select(String expression,
String alias)
Adds a select clause with the given expression and alias to the query.
|
CaseWhenBuilder<PaginatedCriteriaBuilder<T>> |
selectCase()
Like
SelectBuilder.selectCase(java.lang.String) but without an alias. |
CaseWhenBuilder<PaginatedCriteriaBuilder<T>> |
selectCase(String alias)
Starts a
CaseWhenBuilder with the given alias as select alias. |
<Y> SelectObjectBuilder<PaginatedCriteriaBuilder<Y>> |
selectNew(Class<Y> clazz)
Starts a
SelectObjectBuilder for the given class. |
<Y> PaginatedCriteriaBuilder<Y> |
selectNew(ObjectBuilder<Y> builder)
Applies the given object builder to this query.
|
SimpleCaseWhenBuilder<PaginatedCriteriaBuilder<T>> |
selectSimpleCase(String expression)
Like
SelectBuilder.selectSimpleCase(java.lang.String, java.lang.String) but without an alias. |
SimpleCaseWhenBuilder<PaginatedCriteriaBuilder<T>> |
selectSimpleCase(String expression,
String alias)
Starts a
SimpleCaseWhenBuilder with the given alias as select alias. |
SubqueryInitiator<PaginatedCriteriaBuilder<T>> |
selectSubquery()
Like
SelectBuilder.selectSubquery(java.lang.String) but without an alias. |
SubqueryInitiator<PaginatedCriteriaBuilder<T>> |
selectSubquery(String alias)
Starts a
SubqueryInitiator for the select item with the given alias. |
SubqueryInitiator<PaginatedCriteriaBuilder<T>> |
selectSubquery(String subqueryAlias,
String expression)
Like
SelectBuilder.selectSubquery(java.lang.String,java.lang.String,java.lang.String) but without a select alias. |
SubqueryInitiator<PaginatedCriteriaBuilder<T>> |
selectSubquery(String subqueryAlias,
String expression,
String selectAlias)
Starts a
SubqueryInitiator for a new select item with the given select alias. |
PaginatedCriteriaBuilder<T> |
withKeysetExtraction(boolean keysetExtraction)
Enable or disables keyset extraction which influences whether
PagedList.getKeysetPage() is available. |
fetch, fetch, getQuery, getSingleResult, innerJoinFetch, innerJoinFetchDefault, join, joinDefault, leftJoinFetch, leftJoinFetchDefault, page, page, page, rightJoinFetch, rightJoinFetchDefault, selectNew
afterKeyset, afterKeyset, afterKeyset, beforeKeyset, beforeKeyset, beforeKeyset, containsParameter, getMetamodel, getParameter, getParameters, getParameterValue, getQueryString, getResultType, innerJoin, innerJoinDefault, innerJoinDefaultOn, innerJoinOn, isParameterSet, join, joinDefault, joinDefaultOn, joinOn, leftJoin, leftJoinDefault, leftJoinDefaultOn, leftJoinOn, rightJoin, rightJoinDefault, rightJoinDefaultOn, rightJoinOn, setParameter, setParameter, setParameter
whereOr
where, whereCase, whereExists, whereNotExists, whereSimpleCase, whereSubquery, whereSubquery
orderBy, orderByAsc, orderByAsc, orderByDesc, orderByDesc
String getPageCountQueryString()
String getPageIdQueryString()
PaginatedCriteriaBuilder<T> withKeysetExtraction(boolean keysetExtraction)
PagedList.getKeysetPage()
is available.keysetExtraction
- true to enable, false to disable keyset extractionboolean isKeysetExtraction()
PaginatedCriteriaBuilder<T> from(Class<?> entityClass)
BaseQueryBuilder
BaseQueryBuilder.from(java.lang.Class, java.lang.String)
with the
alias equivalent to the camel cased result of what Class.getSimpleName()
of the entity class returns.from
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
entityClass
- The entity class which should be the root entityPaginatedCriteriaBuilder<T> from(Class<?> entityClass, String alias)
BaseQueryBuilder
from
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
entityClass
- The entity class which should be the root entityalias
- The alias for the root entityPagedList<T> getResultList()
QueryBuilder
getResultList
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
SimpleCaseWhenBuilder<PaginatedCriteriaBuilder<T>> selectSimpleCase(String expression)
SelectBuilder
SelectBuilder.selectSimpleCase(java.lang.String, java.lang.String)
but without an alias.selectSimpleCase
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSimpleCase
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSimpleCase
in interface SelectBuilder<T,PaginatedCriteriaBuilder<T>>
expression
- The case operandSimpleCaseWhenBuilder<PaginatedCriteriaBuilder<T>> selectSimpleCase(String expression, String alias)
SelectBuilder
SimpleCaseWhenBuilder
with the given alias as select alias.
The expression is the case operand which will be compared to the when expressions defined in the subsequent SimpleCaseWhenBuilder.selectSimpleCase
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSimpleCase
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSimpleCase
in interface SelectBuilder<T,PaginatedCriteriaBuilder<T>>
expression
- The case operandalias
- The select alias for the simple case when expressionCaseWhenBuilder<PaginatedCriteriaBuilder<T>> selectCase()
SelectBuilder
SelectBuilder.selectCase(java.lang.String)
but without an alias.selectCase
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectCase
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectCase
in interface SelectBuilder<T,PaginatedCriteriaBuilder<T>>
CaseWhenBuilder<PaginatedCriteriaBuilder<T>> selectCase(String alias)
SelectBuilder
CaseWhenBuilder
with the given alias as select alias.selectCase
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectCase
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectCase
in interface SelectBuilder<T,PaginatedCriteriaBuilder<T>>
alias
- The select alias for the case when expression<Y> SelectObjectBuilder<PaginatedCriteriaBuilder<Y>> selectNew(Class<Y> clazz)
QueryBuilder
SelectObjectBuilder
for the given class. The types of the parameter arguments used in the SelectObjectBuilder
must match a constructor of the given class.selectNew
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
Y
- The new query result type specified by the given classclazz
- The class which should be used for the select new select clause<Y> PaginatedCriteriaBuilder<Y> selectNew(ObjectBuilder<Y> builder)
QueryBuilder
selectNew
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
Y
- The new query result type specified by the given classbuilder
- The object builder which transforms the result set into objects of type Y
PaginatedCriteriaBuilder<T> select(String expression)
SelectBuilder
select
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
select
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
select
in interface SelectBuilder<T,PaginatedCriteriaBuilder<T>>
expression
- The expression for the select clausePaginatedCriteriaBuilder<T> select(String expression, String alias)
SelectBuilder
select
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
select
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
select
in interface SelectBuilder<T,PaginatedCriteriaBuilder<T>>
expression
- The expression for the select clausealias
- The alias for the expressionSubqueryInitiator<PaginatedCriteriaBuilder<T>> selectSubquery()
SelectBuilder
SelectBuilder.selectSubquery(java.lang.String)
but without an alias.selectSubquery
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSubquery
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSubquery
in interface SelectBuilder<T,PaginatedCriteriaBuilder<T>>
SubqueryInitiator<PaginatedCriteriaBuilder<T>> selectSubquery(String alias)
SelectBuilder
SubqueryInitiator
for the select item with the given alias.
When the builder finishes, the select item is added to the parent container represented by the type X
.selectSubquery
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSubquery
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSubquery
in interface SelectBuilder<T,PaginatedCriteriaBuilder<T>>
alias
- The select alias for the subquerySubqueryInitiator<PaginatedCriteriaBuilder<T>> selectSubquery(String subqueryAlias, String expression, String selectAlias)
SelectBuilder
SubqueryInitiator
for a new select item with the given select alias.
All occurrences of
subqueryAlias
in expression
will be replaced by the subquery.
When the builder finishes, the select item is added to the parent container represented by the type X
.
selectSubquery
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSubquery
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSubquery
in interface SelectBuilder<T,PaginatedCriteriaBuilder<T>>
subqueryAlias
- The alias for the subquery which will be replaced by the actual subqueryexpression
- The expression which will be added as select item.
This expression contains the subqueryAlias
to define the insertion points for the subquery.selectAlias
- The select alias for the expressionSubqueryInitiator<PaginatedCriteriaBuilder<T>> selectSubquery(String subqueryAlias, String expression)
SelectBuilder
SelectBuilder.selectSubquery(java.lang.String,java.lang.String,java.lang.String)
but without a select alias.selectSubquery
in interface BaseQueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSubquery
in interface QueryBuilder<T,PaginatedCriteriaBuilder<T>>
selectSubquery
in interface SelectBuilder<T,PaginatedCriteriaBuilder<T>>
subqueryAlias
- The alias for the subquery which will be replaced by the actual subqueryexpression
- The expression which will be added as select itemCopyright © 2015 Blazebit. All Rights Reserved.