Package org.springframework.data.mapping
Class Parameter<T,P extends PersistentProperty<P>> 
java.lang.Object
org.springframework.data.mapping.Parameter<T,P> 
- Type Parameters:
- T- the type of the parameter
Value object to represent constructor parameters.
- Author:
- Oliver Gierke, Christoph Strobl, Chris Bono
- 
Constructor SummaryConstructorsConstructorDescriptionParameter(String name, TypeInformation<T> type, Annotation[] annotations, PersistentEntity<T, P> entity) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanMerged annotations that this parameter is annotated with.getName()Returns the name of the parameter (through constructor/method parameter naming).Returns the raw resolved type of the parameter.Returns the required name of the parameter (through constructor/method parameter naming) or throwsIllegalStateExceptionif the parameter has no name.Returns the required expression to be used when looking up a source data structure to populate the actual parameter value or throwsIllegalStateExceptionif there's no expression.Deprecated.getType()Returns theTypeInformationof the parameter.Returns the expression to be used when looking up a source data structure to populate the actual parameter value.inthashCode()booleanhasName()Returns whether the parameter has a name.booleanDeprecated.since 3.3, usehasValueExpression()instead.booleanReturns whether the constructor parameter is equipped with a value expression.
- 
Constructor Details- 
Parameterpublic Parameter(@Nullable String name, TypeInformation<T> type, Annotation[] annotations, @Nullable PersistentEntity<T, P> entity) Creates a newParameterwith the given name,TypeInformationas well as an array ofAnnotations. Will inspect the annotations for anValueannotation to lookup a key or an SpEL expression to be evaluated.- Parameters:
- name- the name of the parameter, can be null
- type- must not be null
- annotations- must not be null but can be empty
- entity- must not be null.
 
 
- 
- 
Method Details- 
getNameReturns the name of the parameter (through constructor/method parameter naming).- Returns:
- the name of the parameter.
- See Also:
 
- 
hasNamepublic boolean hasName()Returns whether the parameter has a name.- Returns:
- whether the parameter has a name.
- Since:
- 3.5
 
- 
getRequiredNameReturns the required name of the parameter (through constructor/method parameter naming) or throwsIllegalStateExceptionif the parameter has no name.- Returns:
- the parameter name or throws IllegalStateExceptionif the parameter does not have a name.
- Since:
- 3.5
- See Also:
 
- 
getTypeReturns theTypeInformationof the parameter.- Returns:
 
- 
getAnnotationsMerged annotations that this parameter is annotated with.- Returns:
- Since:
- 2.5
 
- 
getRawTypeReturns the raw resolved type of the parameter.- Returns:
 
- 
getSpelExpressionDeprecated.since 3.3, usegetValueExpression()instead.Returns the expression to be used when looking up a source data structure to populate the actual parameter value.- Returns:
- the expression to be used when looking up a source data structure.
 
- 
getValueExpressionReturns the expression to be used when looking up a source data structure to populate the actual parameter value.- Returns:
- the expression to be used when looking up a source data structure.
- Since:
- 3.3
 
- 
getRequiredValueExpressionReturns the required expression to be used when looking up a source data structure to populate the actual parameter value or throwsIllegalStateExceptionif there's no expression.- Returns:
- the expression to be used when looking up a source data structure.
- Since:
- 3.3
 
- 
hasSpelExpressionDeprecated.since 3.3, usehasValueExpression()instead.Returns whether the constructor parameter is equipped with a SpEL expression.- Returns:
- true} if the parameter is equipped with a SpEL expression.
 
- 
hasValueExpressionpublic boolean hasValueExpression()Returns whether the constructor parameter is equipped with a value expression.- Returns:
- true} if the parameter is equipped with a value expression.
- Since:
- 3.3
 
- 
equals
- 
hashCodepublic int hashCode()
 
- 
getValueExpression()instead.