Package io.micronaut.data.model.runtime
Interface StoredQuery<E,R> 
- Type Parameters:
- E- The entity type
- R- The result type
- All Superinterfaces:
- io.micronaut.core.annotation.AnnotationMetadataProvider,- io.micronaut.core.annotation.AnnotationSource,- io.micronaut.core.naming.Named,- StoredDataOperation<R>
- All Known Subinterfaces:
- BindableParametersPreparedQuery<E,,- R> - BindableParametersStoredQuery<E,,- R> - DelegatePreparedQuery<E,,- R> - DelegateStoredQuery<E,,- R> - MongoPreparedQuery<E,,- R> - MongoStoredQuery<E,,- R> - PreparedQuery<E,,- R> - SqlPreparedQuery<E,,- R> - SqlStoredQuery<E,- R> 
- All Known Implementing Classes:
- BasicStoredQuery,- DefaultBindableParametersPreparedQuery,- DefaultBindableParametersStoredQuery,- DefaultPreparedQuery,- DefaultSqlPreparedQuery,- DefaultSqlStoredQuery,- DefaultStoredQuery,- DummyPreparedQuery,- QueryResultStoredQuery
A stored computed query. This interface represents the
- Since:
- 1.0.0
- Author:
- graemerocher
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumDescribes the operation type.
- 
Field SummaryFields inherited from interface io.micronaut.core.annotation.AnnotationSourceEMPTY
- 
Method SummaryModifier and TypeMethodDescriptiondefault @NonNull Class<?>[]Deprecated, for removal: This API element is subject to removal in a future version.Not used anymoreDeprecated, for removal: This API element is subject to removal in a future version.Not used anymore@NonNull String[]The query to execute.Get the operation type.Parameter expressions.@NonNull StringgetQuery()The query to execute.The list of query bindings.The parameter binding.@NonNull io.micronaut.core.type.Argument<R>The query result type.@NonNull DataTypeThe query result type.The root entity type.booleanDoes the query have a pageable.booleanbooleanisCount()default booleanReturns whether the query returns the actual entity or a Data Transfer Object (DTO) project.default booleandefault booleanisNative()In cases where one needs to differentiate between at higher level query format (like JPA-QL) and a lower level format (like SQL).default booleanIs with an optimistic lock.default booleanIs the query a procedure.booleanGets an indicator telling whether underlying query is raw query.booleanDeprecated, for removal: This API element is subject to removal in a future version.Not used anymorebooleanDeprecated, for removal: This API element is subject to removal in a future version.Not used anymoreMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProviderfindAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSourcegetAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface io.micronaut.core.naming.NamedgetName
- 
Method Details- 
getRootEntityThe root entity type.- Returns:
- The root entity type
 
- 
hasPageableboolean hasPageable()Does the query have a pageable.- Returns:
- True if it does
 
- 
getQueryThe query to execute.- Returns:
- The query to execute
 
- 
getExpandableQueryPartsThe query to execute.- Returns:
- The query to execute
 
- 
getQueryBindingsList<QueryParameterBinding> getQueryBindings()The list of query bindings.- Returns:
- the query bindings
 
- 
getResultTypeThe query result type. This may differ from the root entity type returned bygetRootEntity().- Returns:
- The query result type
 
- 
getResultArgumentThe query result type. This may differ from the root entity type returned bygetRootEntity().- Specified by:
- getResultArgumentin interface- StoredDataOperation<E>
- Returns:
- The query result type
 
- 
getResultDataType- Returns:
- The result data type.
 
- 
isNativedefault boolean isNative()In cases where one needs to differentiate between at higher level query format (like JPA-QL) and a lower level format (like SQL).- Returns:
- Whether the query is native.
 
- 
isProceduredefault boolean isProcedure()Is the query a procedure.- Returns:
- Whether the query is a procedure invocation.
- Since:
- 4.2.0
 
- 
getOperationTypeStoredQuery.OperationType getOperationType()Get the operation type.- Returns:
- The operation type.
- Since:
- 4.2.0
 
- 
useNumericPlaceholdersDeprecated, for removal: This API element is subject to removal in a future version.Not used anymoreAre the placeholders for query set using numeric indices starting from 1.- Returns:
- True if they are.
 
- 
isDtoProjectiondefault boolean isDtoProjection()Returns whether the query returns the actual entity or a Data Transfer Object (DTO) project. Defaults to false.- Returns:
- Whether the query is a DTO projection query
 
- 
getEntityIdentifierTypeDeprecated, for removal: This API element is subject to removal in a future version.Not used anymoreThe type of the ID member of the entity.- Returns:
- The ID type
 
- 
getArgumentTypesDeprecated, for removal: This API element is subject to removal in a future version.Not used anymoreThe argument types to the method that invokes the query.- Returns:
- The argument types
 
- 
isCountboolean isCount()- Returns:
- Is this a count query.
 
- 
getQueryHintsThe parameter binding. That is the mapping between named query parameters and parameters of the method.- Returns:
- The parameter binding.
 
- 
getJoinFetchPaths- Returns:
- The join paths that require a fetch
 
- 
isSingleResultDeprecated, for removal: This API element is subject to removal in a future version.Not used anymoreWhether the query can be treated as a single result.- Returns:
- True if it can.
 
- 
hasResultConsumerboolean hasResultConsumer()- Returns:
- Whether a result consumer is present
 
- 
isOptimisticLockdefault boolean isOptimisticLock()Is with an optimistic lock.- Returns:
- the result
 
- 
isRawQueryboolean isRawQuery()Gets an indicator telling whether underlying query is raw query.- Returns:
- true if it is raw query
 
- 
isJsonEntitydefault boolean isJsonEntity()- Returns:
- an indicator telling whether query is handling entities with JSON representation (like Oracle Json View)
- Since:
- 4.0.0
 
- 
getParameterExpressionsParameter expressions.- Returns:
- Parameter expressions.
- Since:
- 4.5.0
 
 
-