Interface ParameterBinding.BindingIdentifier

Enclosing class:
ParameterBinding

public static sealed interface ParameterBinding.BindingIdentifier
Identifies a binding parameter by name, position or both. Used to bind parameters to a query or to describe a ParameterBinding.MethodInvocationArgument origin.
Since:
4.0
Author:
Mark Paluch
  • Method Details

    • of

      Creates an identifier for the given name.
      Parameters:
      name -
      Returns:
    • of

      static ParameterBinding.BindingIdentifier of(int position)
      Creates an identifier for the given position.
      Parameters:
      position - 1-based index.
      Returns:
    • of

      static ParameterBinding.BindingIdentifier of(String name, int position)
      Creates an identifier for the given name and position.
      Parameters:
      name -
      Returns:
    • hasName

      default boolean hasName()
      Returns:
      true if the binding is associated with a name.
    • hasPosition

      default boolean hasPosition()
      Returns:
      true if the binding is associated with a position index.
    • getName

      default String getName()
      Returns the binding name if present or throw IllegalStateException if no name associated.
      Returns:
      the binding name.
    • getPosition

      default int getPosition()
      Returns the binding name if present or throw IllegalStateException if no position associated.
      Returns:
      the binding position.