Class ParameterBinding

java.lang.Object
org.springframework.data.jpa.repository.query.ParameterBinding
Direct Known Subclasses:
ParameterBinding.PartTreeParameterBinding

public class ParameterBinding extends Object
A generic parameter binding with name or position information.
Author:
Thomas Darimont, Mark Paluch, Christoph Strobl
  • Method Details

    • getIdentifier

      public ParameterBinding.BindingIdentifier getIdentifier()
    • getOrigin

    • getName

      public @Nullable String getName()
      Returns:
      the name if available or null.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • prepare

      public @Nullable Object prepare(@Nullable Object valueToBind)
      Parameters:
      valueToBind - value to prepare
    • bindsTo

      public boolean bindsTo(ParameterBinding other)
      Check whether the other binding uses the same bind target.
      Parameters:
      other - must not be null.
      Returns:
      true if the other binding uses the same parameter to bind to as this one.
    • isCompatibleWith

      public boolean isCompatibleWith(ParameterBinding other)
      Check whether this binding can be bound as the other binding by checking its type and origin. Subclasses may override this method to include other properties for the compatibility check.
      Parameters:
      other -
      Returns:
      true if the other binding is compatible with this one.