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
public interface DelegateStoredQuery<E,R> extends StoredQuery<E,R>
Delegate implementation ofStoredQuery
.- Since:
- 3.3.
- Author:
- Denis Stepanov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default io.micronaut.core.annotation.AnnotationMetadata
getAnnotationMetadata()
default java.lang.Class<?>[]
getArgumentTypes()
The argument types to the method that invokes the query.default java.util.Optional<java.lang.Class<?>>
getEntityIdentifierType()
The type of the ID member of the entity.default java.lang.String[]
getExpandableQueryParts()
The query to execute.default int[]
getIndexedParameterAutoPopulatedPreviousPropertyIndexes()
The mapping between query parameters and auto populated previous properties that the parameter represents.default java.lang.String[]
getIndexedParameterAutoPopulatedPreviousPropertyPaths()
The mapping between query parameters and auto populated previous properties that the parameter represents.default java.lang.String[]
getIndexedParameterAutoPopulatedPropertyPaths()
The mapping between query parameters and auto populated properties that the parameter represents.default java.util.Set<JoinPath>
getJoinFetchPaths()
default java.lang.String
getName()
default java.lang.String
getQuery()
The query to execute.default java.util.List<QueryParameterBinding>
getQueryBindings()
The list of query bindings.default java.util.Map<java.lang.String,java.lang.Object>
getQueryHints()
The parameter binding.default io.micronaut.core.type.Argument<R>
getResultArgument()
The query result type.default DataType
getResultDataType()
default java.lang.Class<R>
getResultType()
The query result type.default java.lang.Class<E>
getRootEntity()
The root entity type.StoredQuery<E,R>
getStoredQueryDelegate()
default java.util.Optional<TransactionDefinition>
getTransactionDefinition()
default boolean
hasInExpression()
Deprecated.default boolean
hasPageable()
Does the query have a pageable.default boolean
hasResultConsumer()
default boolean
isCount()
default boolean
isDtoProjection()
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
isOptimisticLock()
Is with an optimistic lock.default boolean
isRawQuery()
Gets an indicator telling whether underlying query is raw query.default boolean
isSingleResult()
Whether the query can be treated as a single result.default boolean
useNumericPlaceholders()
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, 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
-
-
-
-
Method Detail
-
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
default java.lang.Class<E> 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
default java.lang.String getQuery()
Description copied from interface:StoredQuery
The query to execute.- Specified by:
getQuery
in interfaceStoredQuery<E,R>
- Returns:
- The query to execute
-
getExpandableQueryParts
default java.lang.String[] getExpandableQueryParts()
Description copied from interface:StoredQuery
The query to execute.- Specified by:
getExpandableQueryParts
in interfaceStoredQuery<E,R>
- Returns:
- The query to execute
-
getQueryBindings
default java.util.List<QueryParameterBinding> getQueryBindings()
Description copied from interface:StoredQuery
The list of query bindings.- Specified by:
getQueryBindings
in interfaceStoredQuery<E,R>
- Returns:
- the query bindings
-
getResultType
default java.lang.Class<R> 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
default java.util.Optional<TransactionDefinition> getTransactionDefinition()
- Specified by:
getTransactionDefinition
in interfaceStoredDataOperation<E>
- Returns:
- If the operation defines a transaction this method returned it.
-
getResultArgument
default io.micronaut.core.type.Argument<R> 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
default DataType 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
default java.util.Optional<java.lang.Class<?>> 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
default java.lang.Class<?>[] 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
default java.util.Map<java.lang.String,java.lang.Object> 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
default java.util.Set<JoinPath> 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
default java.lang.String getName()
- Specified by:
getName
in interfaceio.micronaut.core.naming.Named
-
getIndexedParameterAutoPopulatedPropertyPaths
@Nullable default java.lang.String[] 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
default java.lang.String[] 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.
-
hasInExpression
@Deprecated default boolean hasInExpression()
Deprecated.Description copied from interface:StoredQuery
Does the query contain an in expression.- Specified by:
hasInExpression
in interfaceStoredQuery<E,R>
- Returns:
- True if it does
-
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
-
-