Spring Data for VMware GemFire
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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGemfireQueryMethod(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 theQueryannotated OQL query value for thisQueryMethodif present.String[]getHints()Gets the query HINTs for this query method.Gets the IMPORT statement for this query method.intgetLimit()Gets the LIMIT for this query method on the result set returned by the query.protected MethodReturns theMethodreference on which thisQueryMethodis based.Returns theGemfirePersistentEntityhandled by thisQueryMethod.booleanDetermines whether this query method specifies an annotated, non-empty query.booleanhasHint()Determines whether this query method uses a query HINT to tell the GemFire OQL query engine which indexes to apply to the query execution.booleanDetermine whether this query method declares an IMPORT statement to qualify application domain object types referenced in the query.booleanhasLimit()Determines whether this query method defines a LIMIT on the number of results returned by the query.booleanhasTrace()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, isScrollQuery, 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-Methodobject backing the actual query for thisQueryMethod; must not be null.metadata-RepositoryMetadatacontaining metadata about theRepositoryto which thisQueryMethodbelongs; must not be null.projectionFactory-ProjectionFactoryused to handle the query projection; must not be null.mappingContext-MappingContextused to mapentitiesto Apache Geode and back toentities; must not be null.- See Also:
-
GemfireQueryMethod(Method, RepositoryMetadata, ProjectionFactory, MappingContext, QueryMethodEvaluationContextProvider)RepositoryMetadataProjectionFactoryMappingContextMethod
-
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-Methodobject backing the actual query for thisQueryMethod; must not be null.metadata-RepositoryMetadatacontaining metadata about theRepositoryto which thisQueryMethodbelongs; must not be null.projectionFactory-ProjectionFactoryused to handle the query projection; must not be null.mappingContext-MappingContextused to mapentitiesto Apache Geode and back toentities; must not be null.evaluationContextProvider-QueryMethodEvaluationContextProviderused to process SpEL expressions.- See Also:
-
QueryMethodEvaluationContextProviderRepositoryMetadataProjectionFactoryMappingContextMethod
-
-
Method Details
-
getMethod
Returns theMethodreference on which thisQueryMethodis based. -
getPersistentEntity
Returns theGemfirePersistentEntityhandled by thisQueryMethod.- Returns:
- the
GemfirePersistentEntityhandled 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 theQueryannotated OQL query value for thisQueryMethodif present.- Returns:
- the
Queryannotated 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:
-