Class JpaQueryMethod

java.lang.Object
org.springframework.data.repository.query.QueryMethod
org.springframework.data.jpa.repository.query.JpaQueryMethod

public class JpaQueryMethod extends QueryMethod
JPA specific extension of QueryMethod.
Author:
Oliver Gierke, Thomas Darimont, Christoph Strobl, Nicolas Cirigliano, Mark Paluch, Сергей Цыпанов, Réda Housni Alaoui, Greg Turnquist
  • Constructor Details

  • Method Details

    • getEntityInformation

      public JpaEntityMetadata<?> getEntityInformation()
      Overrides:
      getEntityInformation in class QueryMethod
    • isModifyingQuery

      public boolean isModifyingQuery()
      Returns whether the finder is a modifying one.
      Overrides:
      isModifyingQuery in class QueryMethod
      Returns:
    • hasQueryMetaAttributes

      public boolean hasQueryMetaAttributes()
      Returns:
      return true if Meta annotation is available.
      Since:
      3.0
    • getQueryMetaAttributes

      public Meta getQueryMetaAttributes()
      Returns the Meta attributes to be applied.
      Returns:
      never null.
      Since:
      1.6
    • getAnnotatedQuery

      @Nullable public String getAnnotatedQuery()
      Returns the query string declared in a Query annotation or null if neither the annotation found nor the attribute was specified.
      Returns:
    • getRequiredAnnotatedQuery

      public String getRequiredAnnotatedQuery() throws IllegalStateException
      Returns the required query string declared in a Query annotation or throws IllegalStateException if neither the annotation found nor the attribute was specified.
      Returns:
      Throws:
      IllegalStateException - if no Query annotation is present or the query is empty.
      Since:
      2.0
    • getCountQuery

      @Nullable public String getCountQuery()
      Returns the countQuery string declared in a Query annotation or null if neither the annotation found nor the attribute was specified.
      Returns:
    • getNamedQueryName

      public String getNamedQueryName()
      Overrides:
      getNamedQueryName in class QueryMethod
    • createParameters

      protected JpaParameters createParameters(Method method)
      Overrides:
      createParameters in class QueryMethod
    • getParameters

      public JpaParameters getParameters()
      Overrides:
      getParameters in class QueryMethod
    • isCollectionQuery

      public boolean isCollectionQuery()
      Overrides:
      isCollectionQuery in class QueryMethod
    • isProcedureQuery

      public boolean isProcedureQuery()
      Return true if the method contains a Procedure annotation.
      Returns:
    • getQueryRewriter

      public Class<? extends QueryRewriter> getQueryRewriter()
      Returns the QueryRewriter type.
      Returns:
      type of the QueryRewriter
      Since:
      3.0