public interface ParameterRegistration<T> extends Parameter<T>
Hibernate specific extension to the JPA Parameter
contract as known to the
Query
and StoredProcedureQuery
implementations. Used to track
information known about the parameter.
<p/>
For parameter information as known to JPA criteria queries, see org.hibernate.query.criteria.internal.expression.ParameterExpressionImpl
instead.
Modifier and Type | Method and Description |
---|---|
void |
bindValue(T value)
If bindable, bind the value.
|
void |
bindValue(T value,
TemporalType specifiedTemporalType)
If bindable, bind the value using the specific temporal type.
|
ParameterBind<T> |
getBind()
If bindable, get the current binding.
|
ParameterMode |
getMode()
Retrieves the parameter "mode" which describes how the parameter is defined in the actual database procedure
definition (is it an INPUT parameter? An OUTPUT parameter? etc).
|
Query |
getQuery()
Access to the query that this parameter belongs to.
|
boolean |
isBindable()
Can we bind (set) values on this parameter? Generally this is
true , but would not be in the case
of parameters with OUT or REF_CURSOR mode. |
boolean |
isJpaPositionalParameter()
JPA has a different definition of positional parameters than what legacy Hibernate HQL had.
|
getName, getParameterType, getPosition
boolean isJpaPositionalParameter()
JPA has a different definition of positional parameters than what legacy Hibernate HQL had. In JPA, the parameter holders are labelled (named :/). At any rate the semantics are different and we often need to understand which we are dealing with (and applications might too).
true
if this is a JPA-style positional parameter; false
would indicate
we have either a named parameter (Parameter.getName()
would return a non-null
value) or a native
Hibernate positional parameter.Query getQuery()
Access to the query that this parameter belongs to.
ParameterMode getMode()
Retrieves the parameter "mode" which describes how the parameter is defined in the actual database procedure definition (is it an INPUT parameter? An OUTPUT parameter? etc).
boolean isBindable()
Can we bind (set) values on this parameter? Generally this is true
, but would not be in the case
of parameters with OUT or REF_CURSOR mode.
void bindValue(T value)
If bindable, bind the value.
value
- The value to bind.void bindValue(T value, TemporalType specifiedTemporalType)
If bindable, bind the value using the specific temporal type.
value
- The value to bindspecifiedTemporalType
- The temporal type to use in bindingParameterBind<T> getBind()
If bindable, get the current binding.
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.