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.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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)
    Constructs a new instance of GemfireQueryMethod from the given Method and RepositoryMetadata.
    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)
    Constructs a new instance of GemfireQueryMethod from the given Method and RepositoryMetadata.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the Query annotated OQL query value for this QueryMethod if present.
    Gets the query HINTs for this query method.
    Gets the IMPORT statement for this query method.
    int
    Gets the LIMIT for this query method on the result set returned by the query.
    protected Method
    Returns the Method reference on which this QueryMethod is based.
    Returns the GemfirePersistentEntity handled by this QueryMethod.
    boolean
    Determines whether this query method specifies an annotated, non-empty query.
    boolean
    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
    Determines whether this query method defines a LIMIT on the number of results returned by the query.
    boolean
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • EMPTY_STRING_ARRAY

      protected static final String[] 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)
      Constructs a new instance of GemfireQueryMethod from the given Method and RepositoryMetadata.
      Parameters:
      method - Method object backing the actual query for this QueryMethod; must not be null.
      metadata - RepositoryMetadata containing metadata about the Repository to which this QueryMethod belongs; must not be null.
      projectionFactory - ProjectionFactory used to handle the query projection; must not be null.
      mappingContext - MappingContext used to map entities to Apache Geode and back to entities; must not be null.
      See Also:
    • 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)
      Constructs a new instance of GemfireQueryMethod from the given Method and RepositoryMetadata.
      Parameters:
      method - Method object backing the actual query for this QueryMethod; must not be null.
      metadata - RepositoryMetadata containing metadata about the Repository to which this QueryMethod belongs; must not be null.
      projectionFactory - ProjectionFactory used to handle the query projection; must not be null.
      mappingContext - MappingContext used to map entities to Apache Geode and back to entities; must not be null.
      evaluationContextProvider - QueryMethodEvaluationContextProvider used to process SpEL expressions.
      See Also:
      • QueryMethodEvaluationContextProvider
      • RepositoryMetadata
      • ProjectionFactory
      • MappingContext
      • Method
  • Method Details

    • getMethod

      @NonNull protected Method getMethod()
      Returns the Method reference on which this QueryMethod is based.
      Returns:
      the Method reference on which this QueryMethod is based.
      See Also:
    • getPersistentEntity

      @NonNull public GemfirePersistentEntity<?> getPersistentEntity()
      Returns the GemfirePersistentEntity handled by this QueryMethod.
      Returns:
      the GemfirePersistentEntity handled by this QueryMethod.
      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:
    • getAnnotatedQuery

      @Nullable public String getAnnotatedQuery()
      Returns the Query annotated OQL query value for this QueryMethod 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

      public String[] 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

      public String 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: