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:
DefaultPreparedQuery
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.AnnotationMetadatagetAnnotationMetadata()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.StringgetName()default java.lang.StringgetQuery()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 DataTypegetResultDataType()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 booleanhasInExpression()Deprecated.default booleanhasPageable()Does the query have a pageable.default booleanhasResultConsumer()default booleanisCount()default booleanisDtoProjection()Returns whether the query returns the actual entity or a Data Transfer Object (DTO) project.default 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 booleanisOptimisticLock()Is with an optimistic lock.default booleanisSingleResult()Whether the query can be treated as a single result.default booleanuseNumericPlaceholders()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:
getAnnotationMetadatain interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
getRootEntity
default java.lang.Class<E> getRootEntity()
Description copied from interface:StoredQueryThe root entity type.- Specified by:
getRootEntityin interfaceStoredQuery<E,R>- Returns:
- The root entity type
-
hasPageable
default boolean hasPageable()
Description copied from interface:StoredQueryDoes the query have a pageable.- Specified by:
hasPageablein interfaceStoredQuery<E,R>- Returns:
- True if it does
-
getQuery
default java.lang.String getQuery()
Description copied from interface:StoredQueryThe query to execute.- Specified by:
getQueryin interfaceStoredQuery<E,R>- Returns:
- The query to execute
-
getExpandableQueryParts
default java.lang.String[] getExpandableQueryParts()
Description copied from interface:StoredQueryThe query to execute.- Specified by:
getExpandableQueryPartsin interfaceStoredQuery<E,R>- Returns:
- The query to execute
-
getQueryBindings
default java.util.List<QueryParameterBinding> getQueryBindings()
Description copied from interface:StoredQueryThe list of query bindings.- Specified by:
getQueryBindingsin interfaceStoredQuery<E,R>- Returns:
- the query bindings
-
getResultType
default java.lang.Class<R> 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
-
getTransactionDefinition
default java.util.Optional<TransactionDefinition> getTransactionDefinition()
- Specified by:
getTransactionDefinitionin 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: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
default DataType getResultDataType()
- Specified by:
getResultDataTypein interfaceStoredQuery<E,R>- Returns:
- The result data type.
-
isNative
default boolean isNative()
Description copied from interface:StoredQueryIn cases where one needs to differentiate between at higher level query format (like JPA-QL) and a lower level format (like SQL).- Specified by:
isNativein interfaceStoredQuery<E,R>- Returns:
- Whether the query is native.
-
useNumericPlaceholders
default 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.
-
isDtoProjection
default boolean isDtoProjection()
Description copied from interface:StoredQueryReturns whether the query returns the actual entity or a Data Transfer Object (DTO) project. Defaults to false.- Specified by:
isDtoProjectionin 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:StoredQueryThe type of the ID member of the entity.- Specified by:
getEntityIdentifierTypein interfaceStoredQuery<E,R>- Returns:
- The ID type
-
getArgumentTypes
default java.lang.Class<?>[] getArgumentTypes()
Description copied from interface:StoredQueryThe argument types to the method that invokes the query.- Specified by:
getArgumentTypesin interfaceStoredQuery<E,R>- Returns:
- The argument types
-
isCount
default boolean isCount()
- Specified by:
isCountin 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:StoredQueryThe parameter binding. That is the mapping between named query parameters and parameters of the method.- Specified by:
getQueryHintsin interfaceStoredQuery<E,R>- Returns:
- The parameter binding.
-
getJoinFetchPaths
default java.util.Set<JoinPath> getJoinFetchPaths()
- Specified by:
getJoinFetchPathsin interfaceStoredQuery<E,R>- Returns:
- The join paths that require a fetch
-
isSingleResult
default 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
default boolean hasResultConsumer()
- Specified by:
hasResultConsumerin interfaceStoredQuery<E,R>- Returns:
- Whether a result consumer is present
-
isOptimisticLock
default boolean isOptimisticLock()
Description copied from interface:StoredQueryIs with an optimistic lock.- Specified by:
isOptimisticLockin interfaceStoredQuery<E,R>- Returns:
- the result
-
getName
default java.lang.String getName()
- Specified by:
getNamein interfaceio.micronaut.core.naming.Named
-
getIndexedParameterAutoPopulatedPropertyPaths
@Nullable default java.lang.String[] getIndexedParameterAutoPopulatedPropertyPaths()
Description copied from interface:StoredQueryThe mapping between query parameters and auto populated properties that the parameter represents.- Specified by:
getIndexedParameterAutoPopulatedPropertyPathsin interfaceStoredQuery<E,R>- Returns:
- The auto populated properties.
-
getIndexedParameterAutoPopulatedPreviousPropertyPaths
default java.lang.String[] getIndexedParameterAutoPopulatedPreviousPropertyPaths()
Description copied from interface:StoredQueryThe mapping between query parameters and auto populated previous properties that the parameter represents.- Specified by:
getIndexedParameterAutoPopulatedPreviousPropertyPathsin interfaceStoredQuery<E,R>- Returns:
- The auto populated properties.
-
getIndexedParameterAutoPopulatedPreviousPropertyIndexes
default int[] getIndexedParameterAutoPopulatedPreviousPropertyIndexes()
Description copied from interface:StoredQueryThe mapping between query parameters and auto populated previous properties that the parameter represents.- Specified by:
getIndexedParameterAutoPopulatedPreviousPropertyIndexesin interfaceStoredQuery<E,R>- Returns:
- The auto populated properties.
-
hasInExpression
@Deprecated default boolean hasInExpression()
Deprecated.Description copied from interface:StoredQueryDoes the query contain an in expression.- Specified by:
hasInExpressionin interfaceStoredQuery<E,R>- Returns:
- True if it does
-
-