Class R2dbcQueryMethod

java.lang.Object
org.springframework.data.repository.query.QueryMethod
org.springframework.data.r2dbc.repository.query.R2dbcQueryMethod

public class R2dbcQueryMethod extends org.springframework.data.repository.query.QueryMethod
Reactive specific implementation of QueryMethod.
Author:
Mark Paluch, Stephen Cohen, Diego Krupitza
  • Constructor Details

    • R2dbcQueryMethod

      public R2dbcQueryMethod(Method method, org.springframework.data.repository.core.RepositoryMetadata metadata, org.springframework.data.projection.ProjectionFactory projectionFactory, org.springframework.data.mapping.context.MappingContext<? extends RelationalPersistentEntity<?>,? extends RelationalPersistentProperty> mappingContext)
      Creates a new R2dbcQueryMethod from the given Method.
      Parameters:
      method - must not be null.
      metadata - must not be null.
      projectionFactory - must not be null.
      mappingContext - must not be null.
  • Method Details

    • createParameters

      protected RelationalParameters createParameters(Method method)
      Overrides:
      createParameters in class org.springframework.data.repository.query.QueryMethod
    • isCollectionQuery

      public boolean isCollectionQuery()
      Overrides:
      isCollectionQuery in class org.springframework.data.repository.query.QueryMethod
    • isModifyingQuery

      public boolean isModifyingQuery()
      Overrides:
      isModifyingQuery in class org.springframework.data.repository.query.QueryMethod
    • hasLockMode

      public boolean hasLockMode()
      Returns:
      is a Lock annotation present or not.
    • isStreamQuery

      public boolean isStreamQuery()
      Overrides:
      isStreamQuery in class org.springframework.data.repository.query.QueryMethod
    • getEntityInformation

      public RelationalEntityMetadata<?> getEntityInformation()
      Overrides:
      getEntityInformation in class org.springframework.data.repository.query.QueryMethod
    • getParameters

      public RelationalParameters getParameters()
      Overrides:
      getParameters in class org.springframework.data.repository.query.QueryMethod
    • hasReactiveWrapperParameter

      public boolean hasReactiveWrapperParameter()
      Check if the given QueryMethod receives a reactive parameter wrapper as one of its parameters.
      Returns:
      true if the given QueryMethod receives a reactive parameter wrapper as one of its parameters.
    • getRequiredAnnotatedQuery

      public String getRequiredAnnotatedQuery()
      Returns the required query string declared in a Query annotation or throws IllegalStateException if neither the annotation found nor the attribute was specified.
      Returns:
      the query string.
      Throws:
      IllegalStateException - in case query method has no annotated query.
    • hasAnnotatedQuery

      public boolean hasAnnotatedQuery()
      Returns:
      true if the Method is annotated with Query.