Interface DelegateStoredQuery<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>
,StoredQuery<E,
R>
- All Known Subinterfaces:
DelegatePreparedQuery<E,
R>
- All Known Implementing Classes:
DefaultBindableParametersPreparedQuery
,DefaultBindableParametersStoredQuery
,DefaultPreparedQuery
,DefaultSqlPreparedQuery
,DefaultSqlStoredQuery
,DummyPreparedQuery
Delegate implementation of
StoredQuery
.- Since:
- 3.3.
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptiondefault io.micronaut.core.annotation.AnnotationMetadata
default Class<?>[]
The argument types to the method that invokes the query.The type of the ID member of the entity.default String[]
The query to execute.default int[]
The mapping between query parameters and auto populated previous properties that the parameter represents.default String[]
The mapping between query parameters and auto populated previous properties that the parameter represents.default String[]
The mapping between query parameters and auto populated properties that the parameter represents.default String
getName()
default String
getQuery()
The query to execute.default List<QueryParameterBinding>
The list of query bindings.The parameter binding.default io.micronaut.core.type.Argument<R>
The query result type.default DataType
The query result type.The root entity type.default Optional<TransactionDefinition>
default boolean
Does the query have a pageable.default boolean
default 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.default boolean
Gets an indicator telling whether underlying query is raw query.default boolean
Whether the query can be treated as a single result.default 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, 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
getIndexedParameterBinding, getIndexedParameterPaths, getIndexedParameterTypes, getLastUpdatedProperty, getParameterBinding, getParameterNames, hasInExpression
-
Method Details
-
getStoredQueryDelegate
StoredQuery<E,R> getStoredQueryDelegate()- Returns:
- The delegate
-
getAnnotationMetadata
default io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()- Specified by:
getAnnotationMetadata
in interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
getRootEntity
Description copied from interface:StoredQuery
The root entity type.- Specified by:
getRootEntity
in interfaceStoredQuery<E,
R> - Returns:
- The root entity type
-
hasPageable
default boolean hasPageable()Description copied from interface:StoredQuery
Does the query have a pageable.- Specified by:
hasPageable
in interfaceStoredQuery<E,
R> - Returns:
- True if it does
-
getQuery
Description copied from interface:StoredQuery
The query to execute.- Specified by:
getQuery
in interfaceStoredQuery<E,
R> - Returns:
- The query to execute
-
getExpandableQueryParts
Description copied from interface:StoredQuery
The query to execute.- Specified by:
getExpandableQueryParts
in interfaceStoredQuery<E,
R> - Returns:
- The query to execute
-
getQueryBindings
Description copied from interface:StoredQuery
The list of query bindings.- Specified by:
getQueryBindings
in interfaceStoredQuery<E,
R> - Returns:
- the query bindings
-
getResultType
Description copied from interface:StoredQuery
The query result type. This may differ from the root entity type returned byStoredQuery.getRootEntity()
.- Specified by:
getResultType
in interfaceStoredQuery<E,
R> - Returns:
- The query result type
-
getTransactionDefinition
- Specified by:
getTransactionDefinition
in interfaceStoredDataOperation<E>
- Returns:
- If the operation defines a transaction this method returned it.
-
getResultArgument
Description copied from interface:StoredQuery
The query result type. This may differ from the root entity type returned byStoredQuery.getRootEntity()
.- Specified by:
getResultArgument
in interfaceStoredDataOperation<E>
- Specified by:
getResultArgument
in interfaceStoredQuery<E,
R> - Returns:
- The query result type
-
getResultDataType
- Specified by:
getResultDataType
in interfaceStoredQuery<E,
R> - Returns:
- The result data type.
-
isNative
default boolean isNative()Description copied from interface:StoredQuery
In cases where one needs to differentiate between at higher level query format (like JPA-QL) and a lower level format (like SQL).- Specified by:
isNative
in interfaceStoredQuery<E,
R> - Returns:
- Whether the query is native.
-
useNumericPlaceholders
default boolean useNumericPlaceholders()Description copied from interface:StoredQuery
Are the placeholders for query set using numeric indices starting from 1.- Specified by:
useNumericPlaceholders
in interfaceStoredQuery<E,
R> - Returns:
- True if they are.
-
isDtoProjection
default boolean isDtoProjection()Description copied from interface:StoredQuery
Returns whether the query returns the actual entity or a Data Transfer Object (DTO) project. Defaults to false.- Specified by:
isDtoProjection
in interfaceStoredQuery<E,
R> - Returns:
- Whether the query is a DTO projection query
-
getEntityIdentifierType
Description copied from interface:StoredQuery
The type of the ID member of the entity.- Specified by:
getEntityIdentifierType
in interfaceStoredQuery<E,
R> - Returns:
- The ID type
-
getArgumentTypes
Description copied from interface:StoredQuery
The argument types to the method that invokes the query.- Specified by:
getArgumentTypes
in interfaceStoredQuery<E,
R> - Returns:
- The argument types
-
isCount
default boolean isCount()- Specified by:
isCount
in interfaceStoredQuery<E,
R> - Returns:
- Is this a count query.
-
getQueryHints
Description copied from interface:StoredQuery
The parameter binding. That is the mapping between named query parameters and parameters of the method.- Specified by:
getQueryHints
in interfaceStoredQuery<E,
R> - Returns:
- The parameter binding.
-
getJoinFetchPaths
- Specified by:
getJoinFetchPaths
in interfaceStoredQuery<E,
R> - Returns:
- The join paths that require a fetch
-
isSingleResult
default boolean isSingleResult()Description copied from interface:StoredQuery
Whether the query can be treated as a single result.- Specified by:
isSingleResult
in interfaceStoredQuery<E,
R> - Returns:
- True if it can.
-
hasResultConsumer
default boolean hasResultConsumer()- Specified by:
hasResultConsumer
in interfaceStoredQuery<E,
R> - Returns:
- Whether a result consumer is present
-
isOptimisticLock
default boolean isOptimisticLock()Description copied from interface:StoredQuery
Is with an optimistic lock.- Specified by:
isOptimisticLock
in interfaceStoredQuery<E,
R> - Returns:
- the result
-
getName
- Specified by:
getName
in interfaceio.micronaut.core.naming.Named
-
getIndexedParameterAutoPopulatedPropertyPaths
Description copied from interface:StoredQuery
The mapping between query parameters and auto populated properties that the parameter represents.- Specified by:
getIndexedParameterAutoPopulatedPropertyPaths
in interfaceStoredQuery<E,
R> - Returns:
- The auto populated properties.
-
getIndexedParameterAutoPopulatedPreviousPropertyPaths
Description copied from interface:StoredQuery
The mapping between query parameters and auto populated previous properties that the parameter represents.- Specified by:
getIndexedParameterAutoPopulatedPreviousPropertyPaths
in interfaceStoredQuery<E,
R> - Returns:
- The auto populated properties.
-
getIndexedParameterAutoPopulatedPreviousPropertyIndexes
default int[] getIndexedParameterAutoPopulatedPreviousPropertyIndexes()Description copied from interface:StoredQuery
The mapping between query parameters and auto populated previous properties that the parameter represents.- Specified by:
getIndexedParameterAutoPopulatedPreviousPropertyIndexes
in interfaceStoredQuery<E,
R> - Returns:
- The auto populated properties.
-
isRawQuery
default boolean isRawQuery()Description copied from interface:StoredQuery
Gets an indicator telling whether underlying query is raw query.- Specified by:
isRawQuery
in interfaceStoredQuery<E,
R> - Returns:
- true if it is raw query
-