Class GemfireQueryMethod
java.lang.Object
org.springframework.data.repository.query.QueryMethod
org.springframework.data.gemfire.repository.query.GemfireQueryMethod
public class GemfireQueryMethod
extends org.springframework.data.repository.query.QueryMethod
QueryMethod
implementation for Apache Geode.-
Field Summary
-
Constructor Summary
ConstructorDescriptionGemfireQueryMethod
(Method method, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory projectionFactory, org.springframework.data.mapping.context.MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> mappingContext) GemfireQueryMethod
(Method method, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory projectionFactory, org.springframework.data.mapping.context.MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> mappingContext, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider) -
Method Summary
Modifier and TypeMethodDescriptionReturns theQuery
annotated OQL query value for thisQueryMethod
if present.String[]
getHints()
Gets the query HINTs for this query method.Gets the IMPORT statement for this query method.int
getLimit()
Gets the LIMIT for this query method on the result set returned by the query.protected Method
Returns theMethod
reference on which thisQueryMethod
is based.Returns theGemfirePersistentEntity
handled by thisQueryMethod
.boolean
Determines whether this query method specifies an annotated, non-empty query.boolean
hasHint()
Determines whether this query method uses a query HINT to tell the GemFire OQL query engine which indexes to apply to the query execution.boolean
Determine whether this query method declares an IMPORT statement to qualify application domain object types referenced in the query.boolean
hasLimit()
Determines whether this query method defines a LIMIT on the number of results returned by the query.boolean
hasTrace()
Determines whether this query method has TRACE (i.e.Methods inherited from class org.springframework.data.repository.query.QueryMethod
createParameters, createParameters, getDomainClass, getEntityInformation, getName, getNamedQueryName, getParameters, getResultProcessor, getReturnedObjectType, isCollectionQuery, isModifyingQuery, isPageQuery, isQueryForEntity, isSliceQuery, isStreamQuery, toString
-
Field Details
-
EMPTY_STRING_ARRAY
-
-
Constructor Details
-
GemfireQueryMethod
public GemfireQueryMethod(@NonNull Method method, @NonNull org.springframework.data.repository.core.RepositoryMetadata metadata, @NonNull org.springframework.data.projection.ProjectionFactory projectionFactory, @NonNull org.springframework.data.mapping.context.MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> mappingContext) - Parameters:
method
-Method
object backing the actual query for thisQueryMethod
; must not be null.metadata
-RepositoryMetadata
containing metadata about theRepository
to which thisQueryMethod
belongs; must not be null.projectionFactory
-ProjectionFactory
used to handle the query projection; must not be null.mappingContext
-MappingContext
used to mapentities
to Apache Geode and back toentities
; must not be null.- See Also:
-
GemfireQueryMethod(Method, RepositoryMetadata, ProjectionFactory, MappingContext, QueryMethodEvaluationContextProvider)
RepositoryMetadata
ProjectionFactory
MappingContext
Method
-
GemfireQueryMethod
public GemfireQueryMethod(@NonNull Method method, @NonNull org.springframework.data.repository.core.RepositoryMetadata metadata, @NonNull org.springframework.data.projection.ProjectionFactory projectionFactory, @NonNull org.springframework.data.mapping.context.MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> mappingContext, @Nullable org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider) - Parameters:
method
-Method
object backing the actual query for thisQueryMethod
; must not be null.metadata
-RepositoryMetadata
containing metadata about theRepository
to which thisQueryMethod
belongs; must not be null.projectionFactory
-ProjectionFactory
used to handle the query projection; must not be null.mappingContext
-MappingContext
used to mapentities
to Apache Geode and back toentities
; must not be null.evaluationContextProvider
-QueryMethodEvaluationContextProvider
used to process SpEL expressions.- See Also:
-
QueryMethodEvaluationContextProvider
RepositoryMetadata
ProjectionFactory
MappingContext
Method
-
-
Method Details
-
getMethod
Returns theMethod
reference on which thisQueryMethod
is based. -
getPersistentEntity
Returns theGemfirePersistentEntity
handled by thisQueryMethod
.- Returns:
- the
GemfirePersistentEntity
handled by thisQueryMethod
. - See Also:
-
hasAnnotatedQuery
public boolean hasAnnotatedQuery()Determines whether this query method specifies an annotated, non-empty query.- Returns:
- a boolean value indicating whether the query method specifies an annotated, non-empty query.
- See Also:
-
StringUtils.hasText(String)
getAnnotatedQuery()
-
getAnnotatedQuery
Returns theQuery
annotated OQL query value for thisQueryMethod
if present.- Returns:
- the
Query
annotated OQL query value or null in case it's null, empty or not present. - See Also:
-
hasHint
public boolean hasHint()Determines whether this query method uses a query HINT to tell the GemFire OQL query engine which indexes to apply to the query execution.- Returns:
- a boolean value to indicate whether this query method uses a query HINT.
- See Also:
-
getHints
Gets the query HINTs for this query method.- Returns:
- the query HINTs for this query method or an empty array if this query method has no query HINTs.
- See Also:
-
hasImport
public boolean hasImport()Determine whether this query method declares an IMPORT statement to qualify application domain object types referenced in the query.- Returns:
- a boolean value to indicate whether this query method declares an IMPORT statement.
- See Also:
-
getImport
Gets the IMPORT statement for this query method.- Returns:
- the IMPORT statement for this query method or null if this query method does not have an IMPORT statement.
- See Also:
-
hasLimit
public boolean hasLimit()Determines whether this query method defines a LIMIT on the number of results returned by the query.- Returns:
- a boolean value indicating whether this query method defines a LIMIT on the result set returned by the query.
- See Also:
-
getLimit
public int getLimit()Gets the LIMIT for this query method on the result set returned by the query.- Returns:
- the LIMIT for this query method limiting the number of results returned by the query.
- See Also:
-
hasTrace
public boolean hasTrace()Determines whether this query method has TRACE (i.e. logging) enabled.- Returns:
- a boolean value to indicate whether this query method has TRACE enabled.
- See Also:
-