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 typeRT- The result type
- All Implemented Interfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider,io.micronaut.core.annotation.AnnotationSource,io.micronaut.core.naming.Named,io.micronaut.data.model.runtime.StoredDataOperation<RT>,io.micronaut.data.model.runtime.StoredQuery<E,RT>
@Internal public final class DefaultStoredQuery<E,RT> extends io.micronaut.data.model.runtime.DefaultStoredDataOperation<RT> implements io.micronaut.data.model.runtime.StoredQuery<E,RT>Represents a prepared query.
-
-
Constructor Summary
Constructors Constructor Description DefaultStoredQuery(io.micronaut.inject.ExecutableMethod<?,?> method, java.lang.Class<RT> resultType, java.lang.Class<E> rootEntity, java.lang.String query, boolean isCount, io.micronaut.data.operations.HintsCapableRepository repositoryOperations)The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.Class<?>[]getArgumentTypes()java.util.Optional<java.lang.Class<?>>getEntityIdentifierType()java.lang.String[]getExpandableQueryParts()int[]getIndexedParameterBinding()io.micronaut.data.model.DataType[]getIndexedParameterTypes()java.util.Set<io.micronaut.data.model.query.JoinPath>getJoinFetchPaths()io.micronaut.inject.ExecutableMethod<?,?>getMethod()java.lang.StringgetName()java.lang.StringgetQuery()java.util.List<io.micronaut.data.model.runtime.QueryParameterBinding>getQueryBindings()java.util.Map<java.lang.String,java.lang.Object>getQueryHints()io.micronaut.data.model.DataTypegetResultDataType()java.lang.Class<RT>getResultType()java.lang.Class<E>getRootEntity()inthashCode()booleanhasPageable()booleanhasResultConsumer()booleanisCount()booleanisDtoProjection()booleanisNative()booleanisOptimisticLock()booleanisRawQuery()booleanisSingleResult()booleanuseNumericPlaceholders()Is this a raw SQL query.-
Methods inherited from class io.micronaut.data.model.runtime.DefaultStoredDataOperation
getAnnotationMetadata, getResultArgument, getTransactionDefinition
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, 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.StoredDataOperation
getTransactionDefinition
-
Methods inherited from interface io.micronaut.data.model.runtime.StoredQuery
getIndexedParameterAutoPopulatedPreviousPropertyIndexes, getIndexedParameterAutoPopulatedPreviousPropertyPaths, getIndexedParameterAutoPopulatedPropertyPaths, getIndexedParameterPaths, getLastUpdatedProperty, getParameterBinding, getParameterNames, getResultArgument, hasInExpression
-
-
-
-
Constructor Detail
-
DefaultStoredQuery
public DefaultStoredQuery(@NonNull io.micronaut.inject.ExecutableMethod<?,?> method, @NonNull java.lang.Class<RT> resultType, @NonNull java.lang.Class<E> rootEntity, @NonNull java.lang.String query, boolean isCount, io.micronaut.data.operations.HintsCapableRepository repositoryOperations)The default constructor.- Parameters:
method- The target methodresultType- The result type of the queryrootEntity- The root entity of the queryquery- The query itselfisCount- Is the query a count queryrepositoryOperations- The repositoryOperations
-
-
Method Detail
-
getQueryBindings
public java.util.List<io.micronaut.data.model.runtime.QueryParameterBinding> getQueryBindings()
-
getJoinFetchPaths
@NonNull public java.util.Set<io.micronaut.data.model.query.JoinPath> getJoinFetchPaths()
-
getMethod
public io.micronaut.inject.ExecutableMethod<?,?> getMethod()
- Returns:
- The method
-
isSingleResult
public boolean isSingleResult()
-
hasResultConsumer
public boolean hasResultConsumer()
-
isCount
public boolean isCount()
-
getIndexedParameterTypes
@NonNull public io.micronaut.data.model.DataType[] getIndexedParameterTypes()
-
getIndexedParameterBinding
@NonNull public int[] getIndexedParameterBinding()
-
getQueryHints
@NonNull public java.util.Map<java.lang.String,java.lang.Object> getQueryHints()
-
isNative
public boolean isNative()
-
useNumericPlaceholders
public boolean useNumericPlaceholders()
Is this a raw SQL query.
-
isDtoProjection
public boolean isDtoProjection()
-
getResultType
@NonNull public java.lang.Class<RT> getResultType()
-
getResultDataType
@NonNull public io.micronaut.data.model.DataType getResultDataType()
-
getEntityIdentifierType
public java.util.Optional<java.lang.Class<?>> getEntityIdentifierType()
-
getRootEntity
@NonNull public java.lang.Class<E> getRootEntity()
-
hasPageable
public boolean hasPageable()
-
getQuery
@NonNull public java.lang.String getQuery()
-
getExpandableQueryParts
public java.lang.String[] getExpandableQueryParts()
-
getName
@NonNull public java.lang.String getName()
- Specified by:
getNamein interfaceio.micronaut.core.naming.Named
-
getArgumentTypes
@NonNull public java.lang.Class<?>[] getArgumentTypes()
-
isOptimisticLock
public boolean isOptimisticLock()
-
isRawQuery
public boolean isRawQuery()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-