Class AbstractPersistentEntityCriteriaQuery<T>
java.lang.Object
io.micronaut.data.model.jpa.criteria.impl.AbstractPersistentEntityCriteriaQuery<T>
- Type Parameters:
T
- The entity type
- All Implemented Interfaces:
QueryModelPersistentEntityCriteriaQuery
,QueryResultPersistentEntityCriteriaQuery
,PersistentEntityCriteriaQuery<T>
,jakarta.persistence.criteria.AbstractQuery<T>
,jakarta.persistence.criteria.CommonAbstractCriteria
,jakarta.persistence.criteria.CriteriaQuery<T>
@Internal
public abstract class AbstractPersistentEntityCriteriaQuery<T>
extends Object
implements PersistentEntityCriteriaQuery<T>, QueryResultPersistentEntityCriteriaQuery
The abstract implementation of
PersistentEntityCriteriaQuery
.- Since:
- 3.2
- Author:
- Denis Stepanov
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected PersistentEntityRoot<?>
protected boolean
protected int
protected int
protected List<jakarta.persistence.criteria.Order>
protected jakarta.persistence.criteria.Predicate
protected jakarta.persistence.criteria.Selection<?>
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractPersistentEntityCriteriaQuery
(Class<T> resultType) -
Method Summary
Modifier and TypeMethodDescriptionbuildQuery
(QueryBuilder queryBuilder) protected @NonNull QueryModelPredicateVisitor
createPredicateVisitor
(QueryModel queryModel) Creates query model predicate visitor.distinct
(boolean distinct) forUpdate
(boolean forUpdate) abstract <X> PersistentEntityRoot<X>
from
(PersistentEntity persistentEntity) <X> PersistentEntityRoot<X>
from
(jakarta.persistence.metamodel.EntityType<X> entity) abstract <X> PersistentEntityRoot<X>
List<jakarta.persistence.criteria.Expression<?>>
jakarta.persistence.criteria.Predicate
List<jakarta.persistence.criteria.Order>
Set<jakarta.persistence.criteria.ParameterExpression<?>>
@NonNull QueryModel
jakarta.persistence.criteria.Predicate
Set<jakarta.persistence.criteria.Root<?>>
getRoots()
jakarta.persistence.criteria.Selection<T>
groupBy
(jakarta.persistence.criteria.Expression<?>... grouping) final boolean
final boolean
having
(jakarta.persistence.criteria.Predicate... restrictions) boolean
max
(int max) multiselect
(jakarta.persistence.criteria.Selection<?>... selections) multiselect
(List<jakarta.persistence.criteria.Selection<?>> selectionList) offset
(int offset) orderBy
(jakarta.persistence.criteria.Order... o) <U> jakarta.persistence.criteria.Subquery<U>
where
(jakarta.persistence.criteria.Predicate... restrictions)
-
Field Details
-
resultType
-
predicate
protected jakarta.persistence.criteria.Predicate predicate -
selection
protected jakarta.persistence.criteria.Selection<?> selection -
entityRoot
-
orders
-
max
protected int max -
offset
protected int offset -
forUpdate
protected boolean forUpdate -
distinct
protected boolean distinct
-
-
Constructor Details
-
AbstractPersistentEntityCriteriaQuery
-
-
Method Details
-
buildQuery
- Specified by:
buildQuery
in interfaceQueryResultPersistentEntityCriteriaQuery
-
getQueryModel
- Specified by:
getQueryModel
in interfaceQueryModelPersistentEntityCriteriaQuery
-
createPredicateVisitor
@NonNull protected @NonNull QueryModelPredicateVisitor createPredicateVisitor(QueryModel queryModel) Creates query model predicate visitor.- Parameters:
queryModel
- The query model- Returns:
- the visitor
-
max
- Specified by:
max
in interfacePersistentEntityCriteriaQuery<T>
-
offset
- Specified by:
offset
in interfacePersistentEntityCriteriaQuery<T>
-
forUpdate
- Specified by:
forUpdate
in interfacePersistentEntityCriteriaQuery<T>
-
select
public PersistentEntityCriteriaQuery<T> select(jakarta.persistence.criteria.Selection<? extends T> selection) - Specified by:
select
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
select
in interfacePersistentEntityCriteriaQuery<T>
-
multiselect
public PersistentEntityCriteriaQuery<T> multiselect(jakarta.persistence.criteria.Selection<?>... selections) - Specified by:
multiselect
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
multiselect
in interfacePersistentEntityCriteriaQuery<T>
-
multiselect
public PersistentEntityCriteriaQuery<T> multiselect(List<jakarta.persistence.criteria.Selection<?>> selectionList) - Specified by:
multiselect
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
multiselect
in interfacePersistentEntityCriteriaQuery<T>
-
from
- Specified by:
from
in interfacejakarta.persistence.criteria.AbstractQuery<T>
- Specified by:
from
in interfacePersistentEntityCriteriaQuery<T>
-
from
- Specified by:
from
in interfacePersistentEntityCriteriaQuery<T>
-
from
- Specified by:
from
in interfacejakarta.persistence.criteria.AbstractQuery<T>
- Specified by:
from
in interfacePersistentEntityCriteriaQuery<T>
-
where
public PersistentEntityCriteriaQuery<T> where(jakarta.persistence.criteria.Expression<Boolean> restriction) - Specified by:
where
in interfacejakarta.persistence.criteria.AbstractQuery<T>
- Specified by:
where
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
where
in interfacePersistentEntityCriteriaQuery<T>
-
where
public PersistentEntityCriteriaQuery<T> where(jakarta.persistence.criteria.Predicate... restrictions) - Specified by:
where
in interfacejakarta.persistence.criteria.AbstractQuery<T>
- Specified by:
where
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
where
in interfacePersistentEntityCriteriaQuery<T>
-
groupBy
public PersistentEntityCriteriaQuery<T> groupBy(jakarta.persistence.criteria.Expression<?>... grouping) - Specified by:
groupBy
in interfacejakarta.persistence.criteria.AbstractQuery<T>
- Specified by:
groupBy
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
groupBy
in interfacePersistentEntityCriteriaQuery<T>
-
groupBy
public PersistentEntityCriteriaQuery<T> groupBy(List<jakarta.persistence.criteria.Expression<?>> grouping) - Specified by:
groupBy
in interfacejakarta.persistence.criteria.AbstractQuery<T>
- Specified by:
groupBy
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
groupBy
in interfacePersistentEntityCriteriaQuery<T>
-
having
public PersistentEntityCriteriaQuery<T> having(jakarta.persistence.criteria.Expression<Boolean> restriction) - Specified by:
having
in interfacejakarta.persistence.criteria.AbstractQuery<T>
- Specified by:
having
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
having
in interfacePersistentEntityCriteriaQuery<T>
-
having
public PersistentEntityCriteriaQuery<T> having(jakarta.persistence.criteria.Predicate... restrictions) - Specified by:
having
in interfacejakarta.persistence.criteria.AbstractQuery<T>
- Specified by:
having
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
having
in interfacePersistentEntityCriteriaQuery<T>
-
orderBy
- Specified by:
orderBy
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
orderBy
in interfacePersistentEntityCriteriaQuery<T>
-
orderBy
- Specified by:
orderBy
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
orderBy
in interfacePersistentEntityCriteriaQuery<T>
-
distinct
- Specified by:
distinct
in interfacejakarta.persistence.criteria.AbstractQuery<T>
- Specified by:
distinct
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
- Specified by:
distinct
in interfacePersistentEntityCriteriaQuery<T>
-
getRoots
- Specified by:
getRoots
in interfacejakarta.persistence.criteria.AbstractQuery<T>
-
getGroupList
- Specified by:
getGroupList
in interfacejakarta.persistence.criteria.AbstractQuery<T>
-
getGroupRestriction
public jakarta.persistence.criteria.Predicate getGroupRestriction()- Specified by:
getGroupRestriction
in interfacejakarta.persistence.criteria.AbstractQuery<T>
-
isDistinct
public boolean isDistinct()- Specified by:
isDistinct
in interfacejakarta.persistence.criteria.AbstractQuery<T>
-
getResultType
- Specified by:
getResultType
in interfacejakarta.persistence.criteria.AbstractQuery<T>
-
getOrderList
- Specified by:
getOrderList
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
-
getParameters
- Specified by:
getParameters
in interfacejakarta.persistence.criteria.CriteriaQuery<T>
-
subquery
- Specified by:
subquery
in interfacejakarta.persistence.criteria.CommonAbstractCriteria
-
getSelection
- Specified by:
getSelection
in interfacejakarta.persistence.criteria.AbstractQuery<T>
-
getRestriction
public jakarta.persistence.criteria.Predicate getRestriction()- Specified by:
getRestriction
in interfacejakarta.persistence.criteria.CommonAbstractCriteria
-
hasOnlyIdRestriction
public final boolean hasOnlyIdRestriction() -
hasVersionRestriction
public final boolean hasVersionRestriction()
-