Class DefaultStoredQuery<E,RT> 
java.lang.Object
io.micronaut.data.model.runtime.DefaultStoredDataOperation<RT>
io.micronaut.data.runtime.query.internal.DefaultStoredQuery<E,RT> 
- Type Parameters:
- E- The entity type
- RT- The result type
- All Implemented Interfaces:
- io.micronaut.core.annotation.AnnotationMetadataProvider,- io.micronaut.core.annotation.AnnotationSource,- io.micronaut.core.naming.Named,- StoredDataOperation<RT>,- StoredQuery<E,- RT> 
@Internal
public final class DefaultStoredQuery<E,RT> 
extends DefaultStoredDataOperation<RT>
implements StoredQuery<E,RT> 
Represents a prepared query.
- 
Field SummaryFields inherited from interface io.micronaut.core.annotation.AnnotationSourceEMPTY
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultStoredQuery(@NonNull io.micronaut.inject.ExecutableMethod<?, ?> method, @NonNull Class<RT> resultType, @NonNull Class<E> rootEntity, @NonNull String query, boolean isCount, HintsCapableRepository repositoryOperations) The default constructor.
- 
Method SummaryModifier and TypeMethodDescriptionboolean@NonNull 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.io.micronaut.inject.ExecutableMethod<?,?> @NonNull StringgetName()@NonNull StringgetQuery()The query to execute.The list of query bindings.The parameter binding.@NonNull DataTypeThe query result type.The root entity type.inthashCode()booleanDoes the query have a pageable.booleanbooleanisCount()booleanReturns whether the query returns the actual entity or a Data Transfer Object (DTO) project.booleanbooleanisNative()In cases where one needs to differentiate between at higher level query format (like JPA-QL) and a lower level format (like SQL).booleanIs with an optimistic lock.booleanGets an indicator telling whether underlying query is raw query.booleanWhether the query can be treated as a single result.booleanIs this a raw SQL query.Methods inherited from class io.micronaut.data.model.runtime.DefaultStoredDataOperationgetAnnotationMetadata, getResultArgumentMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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.data.model.runtime.StoredQuerygetResultArgument
- 
Constructor Details- 
DefaultStoredQuerypublic DefaultStoredQuery(@NonNull @NonNull io.micronaut.inject.ExecutableMethod<?, ?> method, @NonNull @NonNull Class<RT> resultType, @NonNull @NonNull Class<E> rootEntity, @NonNull @NonNull String query, boolean isCount, HintsCapableRepository repositoryOperations) The default constructor.- Parameters:
- method- The target method
- resultType- The result type of the query
- rootEntity- The root entity of the query
- query- The query itself
- isCount- Is the query a count query
- repositoryOperations- The repositoryOperations
 
 
- 
- 
Method Details- 
getQueryBindingsDescription copied from interface:StoredQueryThe list of query bindings.- Specified by:
- getQueryBindingsin interface- StoredQuery<E,- RT> 
- Returns:
- the query bindings
 
- 
getJoinFetchPaths- Specified by:
- getJoinFetchPathsin interface- StoredQuery<E,- RT> 
- Returns:
- The join paths that require a fetch
 
- 
getMethodpublic io.micronaut.inject.ExecutableMethod<?,?> getMethod()- Returns:
- The method
 
- 
isSingleResultpublic boolean isSingleResult()Description copied from interface:StoredQueryWhether the query can be treated as a single result.- Specified by:
- isSingleResultin interface- StoredQuery<E,- RT> 
- Returns:
- True if it can.
 
- 
hasResultConsumerpublic boolean hasResultConsumer()- Specified by:
- hasResultConsumerin interface- StoredQuery<E,- RT> 
- Returns:
- Whether a result consumer is present
 
- 
isCountpublic boolean isCount()- Specified by:
- isCountin interface- StoredQuery<E,- RT> 
- Returns:
- Is this a count query.
 
- 
getQueryHintsDescription copied from interface:StoredQueryThe parameter binding. That is the mapping between named query parameters and parameters of the method.- Specified by:
- getQueryHintsin interface- StoredQuery<E,- RT> 
- Returns:
- The parameter binding.
 
- 
isNativepublic 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 interface- StoredQuery<E,- RT> 
- Returns:
- Whether the query is native.
 
- 
useNumericPlaceholderspublic boolean useNumericPlaceholders()Is this a raw SQL query.- Specified by:
- useNumericPlaceholdersin interface- StoredQuery<E,- RT> 
- Returns:
- The raw sql query.
 
- 
isDtoProjectionpublic 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 interface- StoredQuery<E,- RT> 
- Returns:
- Whether the query is a DTO query
 
- 
getResultTypeDescription copied from interface:StoredQueryThe query result type. This may differ from the root entity type returned byStoredQuery.getRootEntity().- Specified by:
- getResultTypein interface- StoredQuery<E,- RT> 
- Returns:
- The result type
 
- 
getResultDataType- Specified by:
- getResultDataTypein interface- StoredQuery<E,- RT> 
- Returns:
- The result data type.
 
- 
getEntityIdentifierTypeDescription copied from interface:StoredQueryThe type of the ID member of the entity.- Specified by:
- getEntityIdentifierTypein interface- StoredQuery<E,- RT> 
- Returns:
- The ID type
 
- 
getRootEntityDescription copied from interface:StoredQueryThe root entity type.- Specified by:
- getRootEntityin interface- StoredQuery<E,- RT> 
- Returns:
- The root entity type
 
- 
hasPageablepublic boolean hasPageable()Description copied from interface:StoredQueryDoes the query have a pageable.- Specified by:
- hasPageablein interface- StoredQuery<E,- RT> 
- Returns:
- True if it does
 
- 
getQueryDescription copied from interface:StoredQueryThe query to execute.- Specified by:
- getQueryin interface- StoredQuery<E,- RT> 
- Returns:
- The query to execute
 
- 
getExpandableQueryPartsDescription copied from interface:StoredQueryThe query to execute.- Specified by:
- getExpandableQueryPartsin interface- StoredQuery<E,- RT> 
- Returns:
- The query to execute
 
- 
getName- Specified by:
- getNamein interface- io.micronaut.core.naming.Named
 
- 
getArgumentTypesDescription copied from interface:StoredQueryThe argument types to the method that invokes the query.- Specified by:
- getArgumentTypesin interface- StoredQuery<E,- RT> 
- Returns:
- The argument types
 
- 
isOptimisticLockpublic boolean isOptimisticLock()Description copied from interface:StoredQueryIs with an optimistic lock.- Specified by:
- isOptimisticLockin interface- StoredQuery<E,- RT> 
- Returns:
- the result
 
- 
isRawQuerypublic boolean isRawQuery()Description copied from interface:StoredQueryGets an indicator telling whether underlying query is raw query.- Specified by:
- isRawQueryin interface- StoredQuery<E,- RT> 
- Returns:
- true if it is raw query
 
- 
isJsonEntitypublic boolean isJsonEntity()- Specified by:
- isJsonEntityin interface- StoredQuery<E,- RT> 
- Returns:
- an indicator telling whether query is handling entities with JSON representation (like Oracle Json View)
 
- 
equals
- 
hashCodepublic int hashCode()
 
-