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
@Incubating public interface JpaCteContainer extends JpaCriteriaNode
Common contract for criteria parts that can hold CTEs (common table expressions).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <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<?>>
getCteCriterias()
Returns the CTEs that are registered on this container.<T> JpaCteCriteria<T>
with(AbstractQuery<T> criteria)
Registers the givenCriteriaQuery
and returns aJpaCteCriteria
, which can be used for querying.<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 Detail
-
getCteCriterias
Collection<? extends JpaCteCriteria<?>> getCteCriterias()
Returns the CTEs that are registered on this container.
-
getCteCriteria
<T> JpaCteCriteria<T> getCteCriteria(String cteName)
Returns a CTE that is registered by the given name on this container, or any of its parents.
-
with
<T> JpaCteCriteria<T> with(AbstractQuery<T> criteria)
Registers the givenCriteriaQuery
and returns aJpaCteCriteria
, which can be used for querying.
-
withRecursiveUnionAll
<T> JpaCteCriteria<T> withRecursiveUnionAll(AbstractQuery<T> baseCriteria, Function<JpaCteCriteria<T>,AbstractQuery<T>> recursiveCriteriaProducer)
Allows to register a recursive CTE. The baseCriteriaQuery
serves for the structure of theJpaCteCriteria
, which is made available in the recursive criteria producer function, so that the recursiveCriteriaQuery
is able to refer to the CTE again.
-
withRecursiveUnionDistinct
<T> JpaCteCriteria<T> withRecursiveUnionDistinct(AbstractQuery<T> baseCriteria, Function<JpaCteCriteria<T>,AbstractQuery<T>> recursiveCriteriaProducer)
Allows to register a recursive CTE. The baseCriteriaQuery
serves for the structure of theJpaCteCriteria
, which is made available in the recursive criteria producer function, so that the recursiveCriteriaQuery
is able to refer to the CTE again.
-
with
<T> JpaCteCriteria<T> with(String name, AbstractQuery<T> criteria)
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.
-
-