Class AbstractPersistentEntityQuery<T,Self extends PersistentEntityQuery<T>> 
java.lang.Object
io.micronaut.data.model.jpa.criteria.impl.AbstractPersistentEntityQuery<T,Self> 
- Type Parameters:
- T- The type of the result
- Self- The self type
- All Implemented Interfaces:
- QueryResultPersistentEntityCriteriaQuery,- PersistentEntityCommonAbstractCriteria,- PersistentEntityQuery<T>,- jakarta.persistence.criteria.AbstractQuery<T>,- jakarta.persistence.criteria.CommonAbstractCriteria
- Direct Known Subclasses:
- AbstractPersistentEntityCriteriaQuery,- AbstractPersistentEntitySubquery
@Internal
public abstract class AbstractPersistentEntityQuery<T,Self extends PersistentEntityQuery<T>> 
extends Object
implements jakarta.persistence.criteria.AbstractQuery<T>, QueryResultPersistentEntityCriteriaQuery, PersistentEntityQuery<T>
The abstract implementation of 
PersistentEntityCriteriaQuery.- Since:
- 3.2
- Author:
- Denis Stepanov
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final jakarta.persistence.criteria.CriteriaBuilderprotected booleanprotected PersistentEntityRoot<?>protected booleanprotected intprotected intprotected List<jakarta.persistence.criteria.Order>protected jakarta.persistence.criteria.Predicateprotected final ExpressionType<T>protected jakarta.persistence.criteria.Selection<?>
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractPersistentEntityQuery(ExpressionType<T> resultType, jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder) 
- 
Method SummaryModifier and TypeMethodDescriptionbuildQuery(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryBuilder2 queryBuilder) distinct(boolean distinct) forUpdate(boolean forUpdate) Enables the query for update.abstract <X> PersistentEntityRoot<X>from(PersistentEntity persistentEntity) Create a root usingPersistentEntity.<X> PersistentEntityRoot<X>from(jakarta.persistence.metamodel.EntityType<X> entity) abstract <X> PersistentEntityRoot<X>List<jakarta.persistence.criteria.Expression<?>>jakarta.persistence.criteria.Predicatejakarta.persistence.criteria.PredicateSet<jakarta.persistence.criteria.Root<?>>getRoots()jakarta.persistence.criteria.Selection<T>groupBy(jakarta.persistence.criteria.Expression<?>... grouping) final booleanfinal booleanhaving(jakarta.persistence.criteria.Predicate... restrictions) booleanlimit(int limit) Sets the max rows.offset(int offset) Sets the offset.protected abstract Selfself()where(jakarta.persistence.criteria.Predicate... restrictions) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.data.model.jpa.criteria.PersistentEntityCommonAbstractCriteriasubquery, subqueryMethods inherited from interface io.micronaut.data.model.jpa.criteria.PersistentEntityQueryorderBy, orderByMethods inherited from interface io.micronaut.data.model.jpa.criteria.impl.QueryResultPersistentEntityCriteriaQuerybuildQuery
- 
Field Details- 
parametersInRole
- 
criteriaBuilderprotected final jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder
- 
resultType
- 
predicateprotected jakarta.persistence.criteria.Predicate predicate
- 
selectionprotected jakarta.persistence.criteria.Selection<?> selection
- 
entityRoot
- 
orders
- 
maxprotected int max
- 
offsetprotected int offset
- 
forUpdateprotected boolean forUpdate
- 
distinctprotected boolean distinct
 
- 
- 
Constructor Details- 
AbstractPersistentEntityQueryprotected AbstractPersistentEntityQuery(ExpressionType<T> resultType, jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder) 
 
- 
- 
Method Details- 
getParametersInRole
- 
self- Returns:
- The self instance
 
- 
buildQuerypublic QueryResult buildQuery(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryBuilder2 queryBuilder) - Specified by:
- buildQueryin interface- QueryResultPersistentEntityCriteriaQuery
 
- 
toSelectQueryDefinition- Returns:
- Build QueryBuilder2.SelectQueryDefinition.
 
- 
from- Specified by:
- fromin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
from- Specified by:
- fromin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
fromDescription copied from interface:PersistentEntityQueryCreate a root usingPersistentEntity.- Specified by:
- fromin interface- PersistentEntityQuery<T>
- Type Parameters:
- X- The root type
- Parameters:
- persistentEntity- The persistent entity
- Returns:
- The root
 
- 
limitSets the max rows.- Specified by:
- limitin interface- PersistentEntityQuery<T>
- Parameters:
- limit- The max ros
- Returns:
- self
 
- 
offsetSets the offset.- Specified by:
- offsetin interface- PersistentEntityQuery<T>
- Parameters:
- offset- The offset
- Returns:
- self
 
- 
forUpdateEnables the query for update.- Parameters:
- forUpdate- The for update
- Returns:
- self
 
- 
where- Specified by:
- wherein interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
where- Specified by:
- wherein interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
groupBy- Specified by:
- groupByin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
groupBy- Specified by:
- groupByin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
having- Specified by:
- havingin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
having- Specified by:
- havingin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
distinct- Specified by:
- distinctin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
getRoots- Specified by:
- getRootsin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
getGroupList- Specified by:
- getGroupListin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
getGroupRestrictionpublic jakarta.persistence.criteria.Predicate getGroupRestriction()- Specified by:
- getGroupRestrictionin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
isDistinctpublic boolean isDistinct()- Specified by:
- isDistinctin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
getResultType- Specified by:
- getResultTypein interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
getSelection- Specified by:
- getSelectionin interface- jakarta.persistence.criteria.AbstractQuery<T>
 
- 
getRestrictionpublic jakarta.persistence.criteria.Predicate getRestriction()- Specified by:
- getRestrictionin interface- jakarta.persistence.criteria.CommonAbstractCriteria
 
- 
hasOnlyIdRestrictionpublic final boolean hasOnlyIdRestriction()
- 
hasVersionRestrictionpublic final boolean hasVersionRestriction()
 
-