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 Summary
Modifier and TypeMethodDescriptiondefault StringgetName()Returns the binding nameif presentor throwIllegalStateExceptionif no name associated.default intReturns the binding nameif presentor throwIllegalStateExceptionif no position associated.default booleanhasName()default booleanof(int position) Creates an identifier for the givenposition.Creates an identifier for the givenname.Creates an identifier for the givennameandposition.
-
Method Details
-
of
Creates an identifier for the givenname.- Parameters:
name-- Returns:
-
of
Creates an identifier for the givenposition.- Parameters:
position- 1-based index.- Returns:
-
of
Creates an identifier for the givennameandposition.- Parameters:
name-- Returns:
-
hasName
default boolean hasName()- Returns:
trueif the binding is associated with a name.
-
hasPosition
default boolean hasPosition()- Returns:
trueif the binding is associated with a position index.
-
getName
Returns the binding nameif presentor throwIllegalStateExceptionif no name associated.- Returns:
- the binding name.
-
getPosition
default int getPosition()Returns the binding nameif presentor throwIllegalStateExceptionif no position associated.- Returns:
- the binding position.
-