E
- The entity typeRT
- The result type@Internal public final class DefaultStoredQuery<E,RT> extends DefaultStoredDataOperation<RT> implements StoredQuery<E,RT>
NO_TRANSACTION
Constructor and Description |
---|
DefaultStoredQuery(io.micronaut.inject.ExecutableMethod<?,?> method,
java.lang.Class<RT> resultType,
java.lang.Class<E> rootEntity,
java.lang.String query,
boolean isCount,
HintsCapableRepository repositoryOperations)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Class<?>[] |
getArgumentTypes()
The argument types to the method that invokes the query.
|
java.util.Optional<java.lang.Class<?>> |
getEntityIdentifierType()
The type of the ID member of the entity.
|
java.lang.String[] |
getExpandableQueryParts()
The query to execute.
|
int[] |
getIndexedParameterBinding()
The parameter binding.
|
DataType[] |
getIndexedParameterTypes()
The compute time computed parameter data types for the query indices.
|
java.util.Set<JoinPath> |
getJoinFetchPaths() |
io.micronaut.inject.ExecutableMethod<?,?> |
getMethod() |
java.lang.String |
getName() |
java.lang.String |
getQuery()
The query to execute.
|
java.util.List<QueryParameterBinding> |
getQueryBindings()
The list of query bindings.
|
java.util.Map<java.lang.String,java.lang.Object> |
getQueryHints()
The parameter binding.
|
DataType |
getResultDataType() |
java.lang.Class<RT> |
getResultType()
The query result type.
|
java.lang.Class<E> |
getRootEntity()
The root entity type.
|
int |
hashCode() |
boolean |
hasPageable()
Does the query have a pageable.
|
boolean |
hasResultConsumer() |
boolean |
isCount() |
boolean |
isDtoProjection()
Returns whether the query returns the actual entity or a Data Transfer Object (DTO) project.
|
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).
|
boolean |
isOptimisticLock()
Is with an optimistic lock.
|
boolean |
isSingleResult()
Whether the query can be treated as a single result.
|
boolean |
useNumericPlaceholders()
Is this a raw SQL query.
|
getAnnotationMetadata, getResultArgument, getTransactionDefinition
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getIndexedParameterAutoPopulatedPreviousPropertyIndexes, getIndexedParameterAutoPopulatedPreviousPropertyPaths, getIndexedParameterAutoPopulatedPropertyPaths, getIndexedParameterPaths, getLastUpdatedProperty, getParameterBinding, getParameterNames, getResultArgument, hasInExpression
getTransactionDefinition
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
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, HintsCapableRepository repositoryOperations)
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 repositoryOperationspublic java.util.List<QueryParameterBinding> getQueryBindings()
StoredQuery
getQueryBindings
in interface StoredQuery<E,RT>
@NonNull public java.util.Set<JoinPath> getJoinFetchPaths()
getJoinFetchPaths
in interface StoredQuery<E,RT>
public io.micronaut.inject.ExecutableMethod<?,?> getMethod()
public boolean isSingleResult()
StoredQuery
isSingleResult
in interface StoredQuery<E,RT>
public boolean hasResultConsumer()
hasResultConsumer
in interface StoredQuery<E,RT>
public boolean isCount()
isCount
in interface StoredQuery<E,RT>
@NonNull public DataType[] getIndexedParameterTypes()
StoredQuery
getIndexedParameterTypes
in interface StoredQuery<E,RT>
StoredQuery.useNumericPlaceholders()
@NonNull public int[] getIndexedParameterBinding()
StoredQuery
getIndexedParameterBinding
in interface StoredQuery<E,RT>
StoredQuery.useNumericPlaceholders()
@NonNull public java.util.Map<java.lang.String,java.lang.Object> getQueryHints()
StoredQuery
getQueryHints
in interface StoredQuery<E,RT>
public boolean isNative()
StoredQuery
isNative
in interface StoredQuery<E,RT>
public boolean useNumericPlaceholders()
useNumericPlaceholders
in interface StoredQuery<E,RT>
public boolean isDtoProjection()
StoredQuery
isDtoProjection
in interface StoredQuery<E,RT>
@NonNull public java.lang.Class<RT> getResultType()
StoredQuery
StoredQuery.getRootEntity()
.getResultType
in interface StoredQuery<E,RT>
@NonNull public DataType getResultDataType()
getResultDataType
in interface StoredQuery<E,RT>
public java.util.Optional<java.lang.Class<?>> getEntityIdentifierType()
StoredQuery
getEntityIdentifierType
in interface StoredQuery<E,RT>
@NonNull public java.lang.Class<E> getRootEntity()
StoredQuery
getRootEntity
in interface StoredQuery<E,RT>
public boolean hasPageable()
StoredQuery
hasPageable
in interface StoredQuery<E,RT>
@NonNull public java.lang.String getQuery()
StoredQuery
getQuery
in interface StoredQuery<E,RT>
public java.lang.String[] getExpandableQueryParts()
StoredQuery
getExpandableQueryParts
in interface StoredQuery<E,RT>
@NonNull public java.lang.String getName()
getName
in interface io.micronaut.core.naming.Named
@NonNull public java.lang.Class<?>[] getArgumentTypes()
StoredQuery
getArgumentTypes
in interface StoredQuery<E,RT>
public boolean isOptimisticLock()
StoredQuery
isOptimisticLock
in interface StoredQuery<E,RT>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object