Top Description Methods
org.hibernate.jpa.spi

public Interface ParameterRegistration<T>

extends Parameter<T>
Known Direct Subinterfaces
org.hibernate.jpa.spi.StoredProcedureQueryParameterRegistration, org.hibernate.jpa.spi.NullTypeBindableParameterRegistration
Imports
javax.persistence.Parameter, .ParameterMode, .Query, .TemporalType

Hibernate specific extension to the JPA javax.persistence.Parameter contract as known to the javax.persistence.Query and javax.persistence.StoredProcedureQuery implementations. Used to track information known about the parameter.

For parameter information as known to JPA criteria queries, see org.hibernate.query.criteria.internal.expression.ParameterExpressionImpl instead.

Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public void
bindValue(T
The value to bind.
value
)

If bindable, bind the value.

public void
bindValue(T
The value to bind
value
,
TemporalType
The temporal type to use in binding
specifiedTemporalType
)

If bindable, bind the value using the specific temporal type.

public ParameterBind<T>

Returns:

The current binding
getBind
()

If bindable, get the current binding.

public ParameterMode

Returns:

The parameter mode.
getMode
()

Retrieves the parameter "mode" which describes how the parameter is defined in the actual database procedure definition (is it an INPUT parameter?

public Query

Returns:

The defining query
getQuery
()

Access to the query that this parameter belongs to.

public boolean

Returns:

Whether the parameter is bindable (can set be called).
isBindable
()

Can we bind (set) values on this parameter?

public boolean

Returns:

true if this is a JPA-style positional parameter; false would indicate we have either a named parameter (getName() would return a non-null value) or a native Hibernate positional parameter.
isJpaPositionalParameter
()

JPA has a different definition of positional parameters than what legacy Hibernate HQL had.

Inherited from javax.persistence.Parameter:
getNamegetParameterTypegetPosition

Method Detail

bindValueback to summary
public void bindValue(T value)

If bindable, bind the value.

Parameters
value:T

The value to bind.

bindValueback to summary
public void bindValue(T value, TemporalType specifiedTemporalType)

If bindable, bind the value using the specific temporal type.

Parameters
value:T

The value to bind

specifiedTemporalType:TemporalType

The temporal type to use in binding

getBindback to summary
public ParameterBind<T> getBind()

If bindable, get the current binding.

Returns:ParameterBind<T>

The current binding

getModeback to summary
public 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).

Returns:ParameterMode

The parameter mode.

getQueryback to summary
public Query getQuery()

Access to the query that this parameter belongs to.

Returns:Query

The defining query

isBindableback to summary
public 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.

Returns:boolean

Whether the parameter is bindable (can set be called).

isJpaPositionalParameterback to summary
public 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).

Returns:boolean

true if this is a JPA-style positional parameter; false would indicate we have either a named parameter (getName() would return a non-null value) or a native Hibernate positional parameter.