Class QueryResultStoredQuery<E,R>
java.lang.Object
io.micronaut.data.runtime.query.internal.BasicStoredQuery<E,R>
io.micronaut.data.runtime.query.internal.QueryResultStoredQuery<E,R>
- Type Parameters:
E
- The entity typeR
- The result type
- All Implemented Interfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider
,io.micronaut.core.annotation.AnnotationSource
,io.micronaut.core.naming.Named
,StoredDataOperation<R>
,StoredQuery<E,
R>
The basic
StoredQuery
created from QueryResult
.- Since:
- 3.5.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
Constructor Summary
ConstructorDescriptionQueryResultStoredQuery
(String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<E> rootEntity, Class<R> resultType, boolean pageable, boolean isSingleResult, boolean isCount, DataMethod.OperationType operationType, Collection<JoinPath> joinPaths) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> QueryResultStoredQuery<T,
Long> count
(String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<T> rootEntity) static <T> QueryResultStoredQuery<T,
T> many
(String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<T> rootEntity, boolean pageable) static <T,
R> QueryResultStoredQuery<T, R> many
(String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<T> rootEntity, Class<R> resultType, boolean pageable, Collection<JoinPath> joinPaths) static <T> QueryResultStoredQuery<T,
T> single
(DataMethod.OperationType operationType, String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<T> rootEntity) static <T,
R> QueryResultStoredQuery<T, R> single
(DataMethod.OperationType operationType, String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<T> rootEntity, Class<R> resultType, Collection<JoinPath> joinPaths) Methods inherited from class io.micronaut.data.runtime.query.internal.BasicStoredQuery
getAnnotationMetadata, getExpandableQueryParts, getName, getQuery, getQueryBindings, getResultArgument, getResultDataType, getResultType, getRootEntity, hasPageable, hasResultConsumer, isCount, isRawQuery, isSingleResult, useNumericPlaceholders
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
Methods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
Methods inherited from interface io.micronaut.data.model.runtime.StoredQuery
getArgumentTypes, getEntityIdentifierType, getQueryHints, isDtoProjection, isJsonEntity, isNative, isOptimisticLock
-
Constructor Details
-
QueryResultStoredQuery
public QueryResultStoredQuery(String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<E> rootEntity, Class<R> resultType, boolean pageable, boolean isSingleResult, boolean isCount, DataMethod.OperationType operationType, Collection<JoinPath> joinPaths)
-
-
Method Details
-
single
public static <T> QueryResultStoredQuery<T,T> single(DataMethod.OperationType operationType, String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<T> rootEntity) -
single
public static <T,R> QueryResultStoredQuery<T,R> single(DataMethod.OperationType operationType, String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<T> rootEntity, Class<R> resultType, Collection<JoinPath> joinPaths) -
many
public static <T> QueryResultStoredQuery<T,T> many(String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<T> rootEntity, boolean pageable) -
many
public static <T,R> QueryResultStoredQuery<T,R> many(String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<T> rootEntity, Class<R> resultType, boolean pageable, Collection<JoinPath> joinPaths) -
count
public static <T> QueryResultStoredQuery<T,Long> count(String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryResult queryResult, Class<T> rootEntity) -
getQueryResult
-
getOperationType
-
getJoinFetchPaths
- Returns:
- The join paths that require a fetch
-