java.lang.Object
org.springframework.data.repository.query.parser.Part

public class Part extends Object
A single part of a method name that has to be transformed into a query part. The actual transformation is defined by a Part.Type that is determined from inspecting the given part. The query part can then be looked up via getProperty().
Author:
Oliver Gierke, Martin Baumgartner, Jens Schauder
  • Constructor Details

    • Part

      public Part(String source, Class<?> clazz)
      Creates a new Part from the given method name part, the Class the part originates from and the start parameter index.
      Parameters:
      source - must not be null.
      clazz - must not be null.
    • Part

      public Part(String source, Class<?> clazz, boolean alwaysIgnoreCase)
      Creates a new Part from the given method name part, the Class the part originates from and the start parameter index.
      Parameters:
      source - must not be null.
      clazz - must not be null.
      alwaysIgnoreCase -
  • Method Details

    • getNumberOfArguments

      public int getNumberOfArguments()
      Returns how many method parameters are bound by this part.
      Returns:
    • getProperty

      public PropertyPath getProperty()
      Returns:
      the propertyPath
    • getType

      public Part.Type getType()
      Returns:
      the type
    • shouldIgnoreCase

      public Part.IgnoreCaseType shouldIgnoreCase()
      Returns whether the PropertyPath referenced should be matched ignoring case.
      Returns:
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object