Class BasicStoredQuery<E,R>
java.lang.Object
io.micronaut.data.runtime.query.internal.BasicStoredQuery<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>
- Direct Known Subclasses:
QueryResultStoredQuery
The basic implementation of
StoredQuery.- Since:
- 3.5.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionBasicStoredQuery(String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, String query, String[] expandableQueryParts, List<QueryParameterBinding> queryParameterBindings, Class<E> rootEntity, Class<R> resultType, boolean pageable, boolean isSingleResult, boolean isCount) BasicStoredQuery(String query, String[] expandableQueryParts, List<QueryParameterBinding> queryParameterBindings, Class<E> rootEntity, Class<R> resultType) -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.core.annotation.AnnotationMetadataString[]The query to execute.getName()getQuery()The query to execute.The list of query bindings.io.micronaut.core.type.Argument<R>The query result type.The query result type.The root entity type.booleanDoes the query have a pageable.booleanbooleanisCount()booleanGets an indicator telling whether underlying query is raw query.booleanWhether the query can be treated as a single result.booleanAre the placeholders for query set using numeric indices starting from 1.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface io.micronaut.data.model.runtime.StoredDataOperation
getTransactionDefinitionMethods inherited from interface io.micronaut.data.model.runtime.StoredQuery
getArgumentTypes, getEntityIdentifierType, getIndexedParameterAutoPopulatedPreviousPropertyIndexes, getIndexedParameterAutoPopulatedPreviousPropertyPaths, getIndexedParameterAutoPopulatedPropertyPaths, getIndexedParameterBinding, getIndexedParameterPaths, getIndexedParameterTypes, getJoinFetchPaths, getLastUpdatedProperty, getParameterBinding, getParameterNames, getQueryHints, hasInExpression, isDtoProjection, isJsonEntity, isNative, isOptimisticLock
-
Constructor Details
-
BasicStoredQuery
-
BasicStoredQuery
public BasicStoredQuery(String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, String query, String[] expandableQueryParts, List<QueryParameterBinding> queryParameterBindings, Class<E> rootEntity, Class<R> resultType, boolean pageable, boolean isSingleResult, boolean isCount)
-
-
Method Details
-
getAnnotationMetadata
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()- Specified by:
getAnnotationMetadatain interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
getName
- Specified by:
getNamein interfaceio.micronaut.core.naming.Named
-
getRootEntity
Description copied from interface:StoredQueryThe root entity type.- Specified by:
getRootEntityin interfaceStoredQuery<E,R> - Returns:
- The root entity type
-
getResultType
Description copied from interface:StoredQueryThe query result type. This may differ from the root entity type returned byStoredQuery.getRootEntity().- Specified by:
getResultTypein interfaceStoredQuery<E,R> - Returns:
- The query result type
-
getResultArgument
Description copied from interface:StoredQueryThe query result type. This may differ from the root entity type returned byStoredQuery.getRootEntity().- Specified by:
getResultArgumentin interfaceStoredDataOperation<E>- Specified by:
getResultArgumentin interfaceStoredQuery<E,R> - Returns:
- The query result type
-
getResultDataType
- Specified by:
getResultDataTypein interfaceStoredQuery<E,R> - Returns:
- The result data type.
-
hasPageable
public boolean hasPageable()Description copied from interface:StoredQueryDoes the query have a pageable.- Specified by:
hasPageablein interfaceStoredQuery<E,R> - Returns:
- True if it does
-
getQuery
Description copied from interface:StoredQueryThe query to execute.- Specified by:
getQueryin interfaceStoredQuery<E,R> - Returns:
- The query to execute
-
getExpandableQueryParts
Description copied from interface:StoredQueryThe query to execute.- Specified by:
getExpandableQueryPartsin interfaceStoredQuery<E,R> - Returns:
- The query to execute
-
getQueryBindings
Description copied from interface:StoredQueryThe list of query bindings.- Specified by:
getQueryBindingsin interfaceStoredQuery<E,R> - Returns:
- the query bindings
-
useNumericPlaceholders
public boolean useNumericPlaceholders()Description copied from interface:StoredQueryAre the placeholders for query set using numeric indices starting from 1.- Specified by:
useNumericPlaceholdersin interfaceStoredQuery<E,R> - Returns:
- True if they are.
-
isCount
public boolean isCount()- Specified by:
isCountin interfaceStoredQuery<E,R> - Returns:
- Is this a count query.
-
isSingleResult
public boolean isSingleResult()Description copied from interface:StoredQueryWhether the query can be treated as a single result.- Specified by:
isSingleResultin interfaceStoredQuery<E,R> - Returns:
- True if it can.
-
hasResultConsumer
public boolean hasResultConsumer()- Specified by:
hasResultConsumerin interfaceStoredQuery<E,R> - Returns:
- Whether a result consumer is present
-
isRawQuery
public boolean isRawQuery()Description copied from interface:StoredQueryGets an indicator telling whether underlying query is raw query.- Specified by:
isRawQueryin interfaceStoredQuery<E,R> - Returns:
- true if it is raw query
-