Spring Data Commons

org.springframework.data.repository.query.parser
Class Part

java.lang.Object
  extended by 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 #getQueryPart().

Author:
Oliver Gierke

Nested Class Summary
static class Part.IgnoreCaseType
          The various types of ignore case that are supported.
static class Part.Type
          The type of a method name part.
 
Constructor Summary
Part(String part, Class<?> clazz)
          Creates a new Part from the given method name part, the Class the part originates from and the start parameter index.
Part(String part, 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.
 
Method Summary
 boolean equals(Object obj)
           
 int getNumberOfArguments()
          Returns how many method parameters are bound by this part.
 boolean getParameterRequired()
           
 PropertyPath getProperty()
           
 Part.Type getType()
           
 int hashCode()
           
 Part.IgnoreCaseType shouldIgnoreCase()
          Returns whether the PropertyPath referenced should be matched ignoring case.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Part

public Part(String part,
            Class<?> clazz)
Creates a new Part from the given method name part, the Class the part originates from and the start parameter index.

Parameters:
part - must not be null.
clazz - must not be {@l

Part

public Part(String part,
            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:
part - must not be null.
clazz - must not be null.
alwaysIgnoreCase -
Method Detail

getParameterRequired

public boolean getParameterRequired()

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 obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

Spring Data Commons

Copyright © 2012. All Rights Reserved.