Class RelationalQueryCreator<T>

java.lang.Object
org.springframework.data.repository.query.parser.AbstractQueryCreator<T,Criteria>
org.springframework.data.relational.repository.query.RelationalQueryCreator<T>

public abstract class RelationalQueryCreator<T> extends AbstractQueryCreator<T,Criteria>
Implementation of AbstractQueryCreator that creates a query from a PartTree.
Since:
2.0
Author:
Roman Chigvintsev, Mark Paluch
  • Constructor Details

  • Method Details

    • create

      protected Criteria create(Part part, Iterator<Object> iterator)
      Creates Criteria for the given method name part.
      Specified by:
      create in class AbstractQueryCreator<T,Criteria>
      Parameters:
      part - method name part, must not be null.
      iterator - iterator over query parameter values
      Returns:
      new instance of Criteria
    • and

      protected Criteria and(Part part, Criteria base, Iterator<Object> iterator)
      Combines the given Criteria with the new one created for the given method name part using AND.
      Specified by:
      and in class AbstractQueryCreator<T,Criteria>
      Parameters:
      part - method name part, must not be null.
      base - Criteria to be combined, must not be null.
      iterator - iterator over query parameter values
      Returns:
      Criteria combination
    • or

      protected Criteria or(Criteria base, Criteria criteria)
      Combines two Criterias using OR.
      Specified by:
      or in class AbstractQueryCreator<T,Criteria>
      Parameters:
      base - Criteria to be combined, must not be null.
      criteria - another Criteria to be combined, must not be null.
      Returns:
      Criteria combination
    • validate

      public static void validate(PartTree tree, Parameters<?,?> parameters)
      Validate parameters for the derived query. Specifically checking that the query method defines scalar parameters and collection parameters where required and that invalid parameter declarations are rejected.
      Parameters:
      tree -
      parameters -