Package io.micronaut.data.runtime.query
Class DefaultStoredQueryResolver
java.lang.Object
io.micronaut.data.runtime.query.DefaultStoredQueryResolver
- All Implemented Interfaces:
StoredQueryResolver
@Internal
public abstract class DefaultStoredQueryResolver
extends Object
implements StoredQueryResolver
Default stored query resolver.
- Since:
- 3.3
- Author:
- Denis Stepanov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateCountStoredQuery
(io.micronaut.inject.ExecutableMethod<?, ?> executableMethod, StoredQuery.OperationType operationType, String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, Class<Object> rootEntity, String query, String[] queryParts, List<QueryParameterBinding> queryParameters) Create count stored query from provided values.<E,
QR> StoredQuery<E, QR> createStoredQuery
(io.micronaut.inject.ExecutableMethod<?, ?> executableMethod, StoredQuery.OperationType operationType, String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, Class<Object> rootEntity, String query, String update, String[] queryParts, List<QueryParameterBinding> queryParameters, boolean pageable, boolean isSingleResult) Create stored query from provided values.protected abstract HintsCapableRepository
<E,
R> StoredQuery<E, R> resolveCountQuery
(io.micronaut.aop.MethodInvocationContext<?, ?> context, Class<E> entityClass, Class<R> resultType) Stored count query resolved from the method context.<E,
R> StoredQuery<E, R> resolveQuery
(io.micronaut.aop.MethodInvocationContext<?, ?> context, Class<E> entityClass, Class<R> resultType, boolean isCount) Stored query resolved from the method context.
-
Constructor Details
-
DefaultStoredQueryResolver
public DefaultStoredQueryResolver()
-
-
Method Details
-
resolveQuery
public <E,R> StoredQuery<E,R> resolveQuery(io.micronaut.aop.MethodInvocationContext<?, ?> context, Class<E> entityClass, Class<R> resultType, boolean isCount) Description copied from interface:StoredQueryResolver
Stored query resolved from the method context.- Specified by:
resolveQuery
in interfaceStoredQueryResolver
- Type Parameters:
E
- The entity typeR
- The result type- Parameters:
context
- The method contextentityClass
- The entity typeresultType
- The result typeisCount
- Whether query is count query- Returns:
- The prepared query
-
resolveCountQuery
public <E,R> StoredQuery<E,R> resolveCountQuery(io.micronaut.aop.MethodInvocationContext<?, ?> context, Class<E> entityClass, Class<R> resultType) Description copied from interface:StoredQueryResolver
Stored count query resolved from the method context.- Specified by:
resolveCountQuery
in interfaceStoredQueryResolver
- Type Parameters:
E
- The entity typeR
- The result type- Parameters:
context
- The method contextentityClass
- The entity typeresultType
- The result type- Returns:
- The prepared query
-
createStoredQuery
public <E,QR> StoredQuery<E,QR> createStoredQuery(io.micronaut.inject.ExecutableMethod<?, ?> executableMethod, StoredQuery.OperationType operationType, String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, Class<Object> rootEntity, String query, String update, String[] queryParts, List<QueryParameterBinding> queryParameters, boolean pageable, boolean isSingleResult) Description copied from interface:StoredQueryResolver
Create stored query from provided values. Used for criteria stored query creation.- Specified by:
createStoredQuery
in interfaceStoredQueryResolver
- Type Parameters:
E
- The entity typeQR
- The result type- Parameters:
executableMethod
- The executableMethodoperationType
- The operationTypename
- The nameannotationMetadata
- The annotation metadatarootEntity
- The root entityquery
- The queryupdate
- The update queryqueryParts
- The query partsqueryParameters
- The query parameterspageable
- Has pageableisSingleResult
- Is single result- Returns:
- new instance of stored query
-
createCountStoredQuery
public StoredQuery<Object,Long> createCountStoredQuery(io.micronaut.inject.ExecutableMethod<?, ?> executableMethod, StoredQuery.OperationType operationType, String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, Class<Object> rootEntity, String query, String[] queryParts, List<QueryParameterBinding> queryParameters) Description copied from interface:StoredQueryResolver
Create count stored query from provided values. Used for criteria stored query creation.- Specified by:
createCountStoredQuery
in interfaceStoredQueryResolver
- Parameters:
executableMethod
- The executableMethodoperationType
- The operationTypename
- The nameannotationMetadata
- The annotation metadatarootEntity
- The root entityquery
- The queryqueryParts
- The query partsqueryParameters
- The query parameters- Returns:
- new instance of stored query
-
getHintsCapableRepository
-