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

public class Parameter<T,P extends PersistentProperty<P>> extends Object
Value object to represent constructor parameters.
Author:
Oliver Gierke, Christoph Strobl
  • Constructor Details

    • Parameter

      public Parameter(@Nullable String name, TypeInformation<T> type, Annotation[] annotations, @Nullable PersistentEntity<T,P> entity)
      Creates a new Parameter with the given name, TypeInformation as well as an array of Annotations. Will inspect the annotations for an Value annotation 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

    • getName

      @Nullable public String getName()
      Returns the name of the parameter.
      Returns:
    • getType

      public TypeInformation<T> getType()
      Returns the TypeInformation of the parameter.
      Returns:
    • getAnnotations

      public org.springframework.core.annotation.MergedAnnotations getAnnotations()
      Merged annotations that this parameter is annotated with.
      Returns:
      Since:
      2.5
    • getRawType

      public Class<T> getRawType()
      Returns the raw resolved type of the parameter.
      Returns:
    • getSpelExpression

      public String getSpelExpression()
      Returns the key to be used when looking up a source data structure to populate the actual parameter value.
      Returns:
    • hasSpelExpression

      public boolean hasSpelExpression()
      Returns whether the constructor parameter is equipped with a SpEL expression.
      Returns:
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object