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

  • 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 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

      @Nullable public String getSpelExpression()
      Deprecated.
      since 3.3, use getValueExpression() 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.
    • getValueExpression

      @Nullable public String getValueExpression()
      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.
      Since:
      3.3
    • getRequiredValueExpression

      public String getRequiredValueExpression()
      Returns the required expression to be used when looking up a source data structure to populate the actual parameter value or throws IllegalStateException if there's no expression.
      Returns:
      the expression to be used when looking up a source data structure.
      Since:
      3.3
    • hasSpelExpression

      @Deprecated(since="3.3") public boolean hasSpelExpression()
      Deprecated.
      since 3.3, use hasValueExpression() instead.
      Returns whether the constructor parameter is equipped with a SpEL expression.
      Returns:
      true} if the parameter is equipped with a SpEL expression.
    • hasValueExpression

      public 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

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

      public int hashCode()
      Overrides:
      hashCode in class Object