Package org.hibernate.query.criteria
Interface JpaCteContainer
- All Superinterfaces:
JpaCriteriaNode,Serializable
- All Known Subinterfaces:
JpaCriteriaDelete<T>,JpaCriteriaInsert<T>,JpaCriteriaInsertSelect<T>,JpaCriteriaInsertValues<T>,JpaCriteriaQuery<T>,JpaCriteriaUpdate<T>,JpaManipulationCriteria<E>,JpaQueryableCriteria<T>,JpaSubQuery<T>,SqmCteContainer,SqmDeleteOrUpdateStatement<T>,SqmDmlStatement<E>,SqmInsertStatement<T>,SqmSelectQuery<T>,SqmStatement<T>
- All Known Implementing Classes:
AbstractSqmDmlStatement,AbstractSqmInsertStatement,AbstractSqmRestrictedDmlStatement,AbstractSqmSelectQuery,AbstractSqmStatement,CriteriaDefinition,SqmDeleteStatement,SqmInsertSelectStatement,SqmInsertValuesStatement,SqmSelectStatement,SqmSubQuery,SqmUpdateStatement
Common contract for criteria parts that can hold CTEs (common table expressions).
-
Method Summary
Modifier and TypeMethodDescription<T> JpaCteCriteria<T> getCteCriteria(String cteName) Returns a CTE that is registered by the given name on this container, or any of its parents.Collection<? extends JpaCteCriteria<?>> Returns the CTEs that are registered on this container.<T> JpaCteCriteria<T> with(AbstractQuery<T> criteria) Deprecated, for removal: This API element is subject to removal in a future version.<T> JpaCteCriteria<T> with(String name, AbstractQuery<T> criteria) Likewith(AbstractQuery)but assigns an explicit CTE name.<T> JpaCteCriteria<T> withRecursiveUnionAll(AbstractQuery<T> baseCriteria, Function<JpaCteCriteria<T>, AbstractQuery<T>> recursiveCriteriaProducer) Allows to register a recursive CTE.<T> JpaCteCriteria<T> withRecursiveUnionAll(String name, AbstractQuery<T> baseCriteria, Function<JpaCteCriteria<T>, AbstractQuery<T>> recursiveCriteriaProducer) LikewithRecursiveUnionAll(AbstractQuery, Function)but assigns an explicit CTE name.<T> JpaCteCriteria<T> withRecursiveUnionDistinct(AbstractQuery<T> baseCriteria, Function<JpaCteCriteria<T>, AbstractQuery<T>> recursiveCriteriaProducer) Allows to register a recursive CTE.<T> JpaCteCriteria<T> withRecursiveUnionDistinct(String name, AbstractQuery<T> baseCriteria, Function<JpaCteCriteria<T>, AbstractQuery<T>> recursiveCriteriaProducer) LikewithRecursiveUnionDistinct(AbstractQuery, Function)but assigns an explicit CTE name.
-
Method Details
-
getCteCriterias
Collection<? extends JpaCteCriteria<?>> getCteCriterias()Returns the CTEs that are registered on this container. -
getCteCriteria
Returns a CTE that is registered by the given name on this container, or any of its parents. -
with
Deprecated, for removal: This API element is subject to removal in a future version.Usewith(String, AbstractQuery)and provide an explicit name for the CTERegisters the givenCriteriaQueryand returns aJpaCteCriteria, which can be used for querying.- See Also:
-
withRecursiveUnionAll
<T> JpaCteCriteria<T> withRecursiveUnionAll(AbstractQuery<T> baseCriteria, Function<JpaCteCriteria<T>, AbstractQuery<T>> recursiveCriteriaProducer) Allows to register a recursive CTE. The baseCriteriaQueryserves for the structure of theJpaCteCriteria, which is made available in the recursive criteria producer function, so that the recursiveCriteriaQueryis able to refer to the CTE again.- See Also:
-
withRecursiveUnionDistinct
<T> JpaCteCriteria<T> withRecursiveUnionDistinct(AbstractQuery<T> baseCriteria, Function<JpaCteCriteria<T>, AbstractQuery<T>> recursiveCriteriaProducer) Allows to register a recursive CTE. The baseCriteriaQueryserves for the structure of theJpaCteCriteria, which is made available in the recursive criteria producer function, so that the recursiveCriteriaQueryis able to refer to the CTE again.- See Also:
-
with
Likewith(AbstractQuery)but assigns an explicit CTE name. -
withRecursiveUnionAll
<T> JpaCteCriteria<T> withRecursiveUnionAll(String name, AbstractQuery<T> baseCriteria, Function<JpaCteCriteria<T>, AbstractQuery<T>> recursiveCriteriaProducer) LikewithRecursiveUnionAll(AbstractQuery, Function)but assigns an explicit CTE name. -
withRecursiveUnionDistinct
<T> JpaCteCriteria<T> withRecursiveUnionDistinct(String name, AbstractQuery<T> baseCriteria, Function<JpaCteCriteria<T>, AbstractQuery<T>> recursiveCriteriaProducer) LikewithRecursiveUnionDistinct(AbstractQuery, Function)but assigns an explicit CTE name.
-
with(String, AbstractQuery)and provide an explicit name for the CTE