Package io.micronaut.data.model.runtime
Interface StoredQuery<E,R>
- Type Parameters:
E
- The entity typeR
- 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
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptiondefault Class<?>[]
The argument types to the method that invokes the query.The type of the ID member of the entity.String[]
The query to execute.default int[]
Deprecated.default String[]
Deprecated.default String[]
Deprecated.default int[]
Deprecated.default String[]
Deprecated.default DataType[]
Deprecated.default String
Deprecated.Deprecated.default String[]
Deprecated.getQuery()
The query to execute.The list of query bindings.The parameter binding.io.micronaut.core.type.Argument<R>
The query result type.The query result type.The root entity type.default boolean
Deprecated.boolean
Does the query have a pageable.boolean
boolean
isCount()
default boolean
Returns whether the query returns the actual entity or a Data Transfer Object (DTO) project.default 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).default boolean
Is with an optimistic lock.boolean
Gets an indicator telling whether underlying query is raw query.boolean
Whether the query can be treated as a single result.boolean
Are the placeholders for query set using numeric indices starting from 1.Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, 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.core.naming.Named
getName
Methods inherited from interface io.micronaut.data.model.runtime.StoredDataOperation
getTransactionDefinition
-
Method Details
-
getRootEntity
The root entity type.- Returns:
- The root entity type
-
hasInExpression
Deprecated.Does the query contain an in expression.- Returns:
- True if it does
-
hasPageable
boolean hasPageable()Does the query have a pageable.- Returns:
- True if it does
-
getQuery
The query to execute.- Returns:
- The query to execute
-
getExpandableQueryParts
The query to execute.- Returns:
- The query to execute
-
getQueryBindings
List<QueryParameterBinding> getQueryBindings()The list of query bindings.- Returns:
- the query bindings
-
getResultType
The query result type. This may differ from the root entity type returned bygetRootEntity()
.- Returns:
- The query result type
-
getResultArgument
The query result type. This may differ from the root entity type returned bygetRootEntity()
.- Specified by:
getResultArgument
in interfaceStoredDataOperation<E>
- Returns:
- The query result type
-
getResultDataType
- Returns:
- The result data type.
-
isNative
default 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.
-
useNumericPlaceholders
boolean useNumericPlaceholders()Are the placeholders for query set using numeric indices starting from 1.- Returns:
- True if they are.
-
isDtoProjection
default 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
-
getEntityIdentifierType
The type of the ID member of the entity.- Returns:
- The ID type
-
getArgumentTypes
The argument types to the method that invokes the query.- Returns:
- The argument types
-
getParameterBinding
Deprecated.The parameter binding. That is the mapping between named query parameters and parameters of the method.- Returns:
- The parameter binding.
-
isCount
boolean isCount()- Returns:
- Is this a count query.
-
getIndexedParameterTypes
Deprecated.The compute time computed parameter data types for the query indices.- Returns:
- The indexed values
- See Also:
-
getIndexedParameterBinding
Deprecated.The parameter binding. That is the mapping between named query parameters and parameters of the method.- Returns:
- The parameter binding.
- See Also:
-
getParameterNames
Deprecated.- Returns:
- The parameter names the case where named parameters are supported
-
getIndexedParameterPaths
Deprecated.- Returns:
- The indexed parameter paths.
-
getQueryHints
The parameter binding. That is the mapping between named query parameters and parameters of the method.- Returns:
- The parameter binding.
-
getLastUpdatedProperty
Deprecated.The name of the last updated property on the entity if any.- Returns:
- The last updated property
-
getIndexedParameterAutoPopulatedPropertyPaths
Deprecated.The mapping between query parameters and auto populated properties that the parameter represents.- Returns:
- The auto populated properties.
-
getIndexedParameterAutoPopulatedPreviousPropertyPaths
Deprecated.The mapping between query parameters and auto populated previous properties that the parameter represents.- Returns:
- The auto populated properties.
-
getIndexedParameterAutoPopulatedPreviousPropertyIndexes
Deprecated.The mapping between query parameters and auto populated previous properties that the parameter represents.- Returns:
- The auto populated properties.
-
getJoinFetchPaths
- Returns:
- The join paths that require a fetch
-
isSingleResult
boolean isSingleResult()Whether the query can be treated as a single result.- Returns:
- True if it can.
-
hasResultConsumer
boolean hasResultConsumer()- Returns:
- Whether a result consumer is present
-
isOptimisticLock
default boolean isOptimisticLock()Is with an optimistic lock.- Returns:
- the result
-
isRawQuery
boolean isRawQuery()Gets an indicator telling whether underlying query is raw query.- Returns:
- true if it is raw query
-