Package com.blazebit.persistence
Interface CriteriaBuilder<T>
- Type Parameters:
T- The query result type
- All Superinterfaces:
BaseCriteriaBuilder<T,,CriteriaBuilder<T>> BaseHavingBuilder<CriteriaBuilder<T>>,BaseQueryBuilder<T,,CriteriaBuilder<T>> BaseWhereBuilder<CriteriaBuilder<T>>,CommonQueryBuilder<CriteriaBuilder<T>>,ConfigurationSource,CorrelationQueryBuilder<CriteriaBuilder<T>>,CTEBuilder<CriteriaBuilder<T>>,DistinctBuilder<CriteriaBuilder<T>>,FetchBuilder<CriteriaBuilder<T>>,FromBaseBuilder<CriteriaBuilder<T>>,FromBuilder<CriteriaBuilder<T>>,FromProvider,FullQueryBuilder<T,,CriteriaBuilder<T>> GroupByBuilder<CriteriaBuilder<T>>,HavingBuilder<CriteriaBuilder<T>>,KeysetQueryBuilder<CriteriaBuilder<T>>,LimitBuilder<CriteriaBuilder<T>>,OrderByBuilder<CriteriaBuilder<T>>,ParameterHolder<CriteriaBuilder<T>>,Queryable<T,,CriteriaBuilder<T>> QueryBuilder<T,,CriteriaBuilder<T>> SelectBuilder<CriteriaBuilder<T>>,ServiceProvider,SetOperationBuilder<LeafOngoingSetOperationCriteriaBuilder<T>,,StartOngoingSetOperationCriteriaBuilder<T, LeafOngoingFinalSetOperationCriteriaBuilder<T>>> WhereBuilder<CriteriaBuilder<T>>,WindowContainerBuilder<CriteriaBuilder<T>>
public interface CriteriaBuilder<T>
extends FullQueryBuilder<T,CriteriaBuilder<T>>, BaseCriteriaBuilder<T,CriteriaBuilder<T>>, CTEBuilder<CriteriaBuilder<T>>, SetOperationBuilder<LeafOngoingSetOperationCriteriaBuilder<T>,StartOngoingSetOperationCriteriaBuilder<T,LeafOngoingFinalSetOperationCriteriaBuilder<T>>>
A builder for criteria queries. This is the entry point for building queries.
- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and TypeMethodDescription<Y> CriteriaBuilder<Y>Copies this query builder into a new one, using it's projection as an overridable default.javax.persistence.TypedQuery<Long>Returns a query that counts the distinct query root results that would be produced if the current query was run.javax.persistence.TypedQuery<Long>getQueryRootCountQuery(long maximumCount) Returns a query that counts the distinct query root results and counts up to the maximum value that is given that would be produced if the current query was run.Returns the query string that selects the distinct count of query root elements.getQueryRootCountQueryString(long maximumCount) Returns the query string that selects the distinct count of query root elements and counts up to the maximum value that is given.<Y> CriteriaBuilder<Y>selectNew(ObjectBuilder<Y> builder) Applies the given object builder to this query.<Y> SelectObjectBuilder<CriteriaBuilder<Y>>Starts aSelectObjectBuilderfor the given class.Methods inherited from interface com.blazebit.persistence.BaseHavingBuilder
having, havingCase, havingExists, havingExists, havingExpression, havingExpressionSubqueries, havingNotExists, havingNotExists, havingSimpleCase, havingSubqueries, havingSubquery, havingSubquery, havingSubquery, havingSubqueryMethods inherited from interface com.blazebit.persistence.BaseQueryBuilder
getResultTypeMethods inherited from interface com.blazebit.persistence.BaseWhereBuilder
where, whereCase, whereExists, whereExists, whereExpression, whereExpressionSubqueries, whereNotExists, whereNotExists, whereSimpleCase, whereSubqueries, whereSubquery, whereSubquery, whereSubquery, whereSubqueryMethods inherited from interface com.blazebit.persistence.CommonQueryBuilder
getCriteriaBuilderFactory, getMetamodel, isCacheable, registerMacro, setCacheable, setProperties, setPropertyMethods inherited from interface com.blazebit.persistence.spi.ConfigurationSource
getProperties, getPropertyMethods inherited from interface com.blazebit.persistence.CTEBuilder
hasCte, with, with, with, with, withCtesFrom, withRecursive, withReturning, withStartSet, withStartSetMethods inherited from interface com.blazebit.persistence.DistinctBuilder
distinctMethods inherited from interface com.blazebit.persistence.FetchBuilder
fetch, fetchMethods inherited from interface com.blazebit.persistence.FromBaseBuilder
fromEntitySubquery, fromEntitySubquery, fromEntitySubquery, fromSubquery, fromSubqueryMethods inherited from interface com.blazebit.persistence.FromBuilder
from, from, from, from, fromIdentifiableValues, fromIdentifiableValues, fromIdentifiableValues, fromIdentifiableValues, fromNew, fromNew, fromOld, fromOld, fromValues, fromValues, fromValues, fromValues, getFrom, getFromByPath, getPath, getRequiredPath, getRoots, innerJoin, innerJoinDefault, innerJoinDefaultOn, innerJoinLateralEntitySubquery, innerJoinLateralEntitySubquery, innerJoinLateralEntitySubquery, innerJoinLateralEntitySubquery, innerJoinLateralEntitySubquery, innerJoinLateralOnEntitySubquery, innerJoinLateralOnEntitySubquery, innerJoinLateralOnEntitySubquery, innerJoinLateralOnEntitySubquery, innerJoinLateralOnEntitySubquery, innerJoinLateralOnSubquery, innerJoinLateralOnSubquery, innerJoinLateralOnSubquery, innerJoinLateralOnSubquery, innerJoinLateralOnSubquery, innerJoinLateralSubquery, innerJoinLateralSubquery, innerJoinLateralSubquery, innerJoinLateralSubquery, innerJoinLateralSubquery, innerJoinOn, innerJoinOn, innerJoinOn, innerJoinOn, innerJoinOn, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnSubquery, innerJoinOnSubquery, innerJoinOnSubquery, innerJoinOnSubquery, join, joinDefault, joinDefaultOn, joinLateralEntitySubquery, joinLateralEntitySubquery, joinLateralEntitySubquery, joinLateralEntitySubquery, joinLateralEntitySubquery, joinLateralOnEntitySubquery, joinLateralOnEntitySubquery, joinLateralOnEntitySubquery, joinLateralOnEntitySubquery, joinLateralOnEntitySubquery, joinLateralOnSubquery, joinLateralOnSubquery, joinLateralOnSubquery, joinLateralOnSubquery, joinLateralOnSubquery, joinLateralSubquery, joinLateralSubquery, joinLateralSubquery, joinLateralSubquery, joinLateralSubquery, joinOn, joinOn, joinOn, joinOn, joinOn, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnSubquery, joinOnSubquery, joinOnSubquery, joinOnSubquery, leftJoin, leftJoinDefault, leftJoinDefaultOn, leftJoinLateralEntitySubquery, leftJoinLateralEntitySubquery, leftJoinLateralEntitySubquery, leftJoinLateralEntitySubquery, leftJoinLateralEntitySubquery, leftJoinLateralOnEntitySubquery, leftJoinLateralOnEntitySubquery, leftJoinLateralOnEntitySubquery, leftJoinLateralOnEntitySubquery, leftJoinLateralOnEntitySubquery, leftJoinLateralOnSubquery, leftJoinLateralOnSubquery, leftJoinLateralOnSubquery, leftJoinLateralOnSubquery, leftJoinLateralOnSubquery, leftJoinLateralSubquery, leftJoinLateralSubquery, leftJoinLateralSubquery, leftJoinLateralSubquery, leftJoinLateralSubquery, leftJoinOn, leftJoinOn, leftJoinOn, leftJoinOn, leftJoinOn, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnSubquery, leftJoinOnSubquery, leftJoinOnSubquery, leftJoinOnSubquery, rightJoin, rightJoinDefault, rightJoinDefaultOn, rightJoinOn, rightJoinOn, rightJoinOn, rightJoinOn, rightJoinOn, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnSubquery, rightJoinOnSubquery, rightJoinOnSubquery, rightJoinOnSubqueryMethods inherited from interface com.blazebit.persistence.FullQueryBuilder
copyCriteriaBuilder, createPageIdQuery, createPageIdQuery, createPageIdQuery, createPageIdQuery, getCountQuery, getCountQuery, getCountQueryString, getCountQueryString, innerJoinFetch, innerJoinFetchDefault, join, joinDefault, leftJoinFetch, leftJoinFetchDefault, page, page, page, pageAndNavigate, pageBy, pageBy, pageBy, pageBy, pageByAndNavigate, pageByAndNavigate, rightJoinFetch, rightJoinFetchDefault, selectNewMethods inherited from interface com.blazebit.persistence.GroupByBuilder
groupBy, groupBy, groupByCube, groupByCube, groupByGroupingSets, groupByRollup, groupByRollupMethods inherited from interface com.blazebit.persistence.HavingBuilder
having, havingOr, setHavingExpression, setHavingExpressionSubqueriesMethods inherited from interface com.blazebit.persistence.KeysetQueryBuilder
afterKeyset, afterKeyset, afterKeyset, beforeKeyset, beforeKeyset, beforeKeysetMethods inherited from interface com.blazebit.persistence.LimitBuilder
getFirstResult, getMaxResults, setFirstResult, setMaxResultsMethods inherited from interface com.blazebit.persistence.OrderByBuilder
orderBy, orderBy, orderByAsc, orderByAsc, orderByDesc, orderByDescMethods inherited from interface com.blazebit.persistence.ParameterHolder
containsParameter, getParameter, getParameters, getParameterValue, isParameterSet, registerCriteriaParameter, setParameter, setParameter, setParameter, setParameterTypeMethods inherited from interface com.blazebit.persistence.Queryable
getQuery, getQueryString, getResultList, getResultStream, getSingleResultMethods inherited from interface com.blazebit.persistence.QueryBuilder
getEntityManagerMethods inherited from interface com.blazebit.persistence.SelectBuilder
select, select, selectCase, selectCase, selectSimpleCase, selectSimpleCase, selectSubqueries, selectSubqueries, selectSubquery, selectSubquery, selectSubquery, selectSubquery, selectSubquery, selectSubquery, selectSubquery, selectSubqueryMethods inherited from interface com.blazebit.persistence.spi.ServiceProvider
getServiceMethods inherited from interface com.blazebit.persistence.SetOperationBuilder
except, exceptAll, intersect, intersectAll, startExcept, startExceptAll, startIntersect, startIntersectAll, startUnion, startUnionAll, union, unionAllMethods inherited from interface com.blazebit.persistence.WhereBuilder
setWhereExpression, setWhereExpressionSubqueries, where, whereOrMethods inherited from interface com.blazebit.persistence.WindowContainerBuilder
window
-
Method Details
-
getQueryRootCountQuery
javax.persistence.TypedQuery<Long> getQueryRootCountQuery()Returns a query that counts the distinct query root results that would be produced if the current query was run.- Returns:
- A query for determining the count of the distinct query root result list represented by this query builder
- Since:
- 1.3.0
-
getQueryRootCountQueryString
String getQueryRootCountQueryString()Returns the query string that selects the distinct count of query root elements.- Returns:
- The query string
- Since:
- 1.3.0
-
getQueryRootCountQuery
Returns a query that counts the distinct query root results and counts up to the maximum value that is given that would be produced if the current query was run.- Parameters:
maximumCount- the maximum value up to which should be counted- Returns:
- A query for determining the count of the distinct query root result list represented by this query builder
- Since:
- 1.5.0
-
getQueryRootCountQueryString
Returns the query string that selects the distinct count of query root elements and counts up to the maximum value that is given.- Parameters:
maximumCount- the maximum value up to which should be counted- Returns:
- The query string
- Since:
- 1.5.0
-
copy
Description copied from interface:FullQueryBuilderCopies this query builder into a new one, using it's projection as an overridable default.- Specified by:
copyin interfaceFullQueryBuilder<T,CriteriaBuilder<T>> - Type Parameters:
Y- The type of the result class- Parameters:
resultClass- The result class of the query- Returns:
- A new query builder
-
selectNew
Description copied from interface:FullQueryBuilderStarts aSelectObjectBuilderfor the given class. The types of the parameter arguments used in theSelectObjectBuildermust match a constructor of the given class.- Specified by:
selectNewin interfaceFullQueryBuilder<T,CriteriaBuilder<T>> - Type Parameters:
Y- The new query result type specified by the given class- Parameters:
clazz- The class which should be used for the select new select clause- Returns:
- The select object builder for the given class
-
selectNew
Description copied from interface:FullQueryBuilderApplies the given object builder to this query. The object builder provides the select clauses and is used to transform the result set tuples.- Specified by:
selectNewin interfaceFullQueryBuilder<T,CriteriaBuilder<T>> - Type Parameters:
Y- The new query result type specified by the given class- Parameters:
builder- The object builder which transforms the result set into objects of typeY- Returns:
- The query builder for chaining calls
-