Class Parameter
java.lang.Object
org.springframework.data.repository.query.Parameter
Class to abstract a single parameter of a query method. It is held in the context of a 
Parameters instance.- Author:
- Oliver Gierke, Mark Paluch, Jens Schauder, Greg Turnquist, Johannes Englmeier
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedParameter(MethodParameter parameter) Deprecated, for removal: This API element is subject to removal in a future version.protectedParameter(MethodParameter parameter, TypeInformation<?> domainType) 
- 
Method SummaryModifier and TypeMethodDescriptionintgetIndex()Returns the position index the parameter is bound to in the context of its surroundingParameters.getName()Returns the name of the parameter (throughParamannotation or method parameter naming).Returns the placeholder to be used for the parameter.Returns the required name of the parameter (throughParamannotation or method parameter naming) or throwsIllegalStateExceptionif the parameter has no name.Class<?>getType()Returns the type of theParameter.booleanReturns whether theParameteris to be bound to a query.booleanReturns whether the currentParameteris the one used for dynamic projections.booleanReturns whether the parameter is named explicitly, i.e. annotated withParam.booleanReturns whether the parameter is annotated withParamor has a method parameter name.booleanReturns whether the parameter is a special parameter.toString()
- 
Constructor Details- 
ParameterDeprecated, for removal: This API element is subject to removal in a future version.since 3.1, useParameter(MethodParameter, TypeInformation)instead.Creates a newParameterfor the givenMethodParameter.- Parameters:
- parameter- must not be null.
 
- 
Parameter- Parameters:
- parameter- must not be null.
- domainType- must not be null.
- Since:
- 3.0.2
 
 
- 
- 
Method Details- 
isSpecialParameterpublic boolean isSpecialParameter()Returns whether the parameter is a special parameter.- Returns:
- See Also:
- 
- TYPES
 
 
- 
isBindablepublic boolean isBindable()Returns whether theParameteris to be bound to a query.- Returns:
 
- 
isDynamicProjectionParameterpublic boolean isDynamicProjectionParameter()Returns whether the currentParameteris the one used for dynamic projections.- Returns:
 
- 
getPlaceholderReturns the placeholder to be used for the parameter. Can either be a named one or positional.- Returns:
 
- 
getIndexpublic int getIndex()Returns the position index the parameter is bound to in the context of its surroundingParameters.- Returns:
 
- 
isNamedParameterpublic boolean isNamedParameter()Returns whether the parameter is annotated withParamor has a method parameter name.- Returns:
- See Also:
 
- 
isExplicitlyNamedpublic boolean isExplicitlyNamed()Returns whether the parameter is named explicitly, i.e. annotated withParam.- Returns:
- Since:
- 1.11
- See Also:
 
- 
getNameReturns the name of the parameter (throughParamannotation or method parameter naming).- Returns:
- the optional name of the parameter.
- See Also:
 
- 
getRequiredNameReturns the required name of the parameter (throughParamannotation or method parameter naming) or throwsIllegalStateExceptionif the parameter has no name.- Returns:
- the required parameter name.
- Throws:
- IllegalStateException- if the parameter has no name.
- Since:
- 3.4
- See Also:
 
- 
getTypeReturns the type of theParameter.- Returns:
- the type
 
- 
toString
 
- 
Parameter(MethodParameter, TypeInformation)instead.