public class ProcedureParameterImpl<T> extends QueryParameterImpl<T> implements ProcedureParameterImplementor<T>, ParameterRegistration<T>
Constructor and Description |
---|
ProcedureParameterImpl(ProcedureCallImpl procedureCall,
Integer position,
ParameterMode mode,
Class<T> javaType,
Type hibernateType,
boolean initialPassNullsSetting) |
ProcedureParameterImpl(ProcedureCallImpl procedureCall,
String name,
ParameterMode mode,
Class<T> javaType,
Type hibernateType,
boolean initialPassNullsSetting) |
Modifier and Type | Method and Description |
---|---|
void |
bindValue(Object value)
Bind a value to the parameter.
|
void |
bindValue(Object value,
TemporalType explicitTemporalType)
Bind a value to the parameter, using just a specified portion of the DATE/TIME value.
|
void |
enablePassingNulls(boolean enabled)
Controls how unbound values for this IN/INOUT parameter registration will be handled prior to
execution.
|
T |
extract(CallableStatement statement)
Extract value from the statement after execution (used for OUT/INOUT parameters).
|
ParameterBind<T> |
getBind()
Retrieve the binding associated with this parameter.
|
ParameterMode |
getMode()
Retrieves the parameter "mode".
|
String |
getName()
Return the parameter name, or null if the parameter is
not a named parameter or no name has been assigned.
|
Class<T> |
getParameterType()
Return the Java type of the parameter.
|
Integer |
getPosition()
Return the parameter position, or null if the parameter
is not a positional parameter.
|
int[] |
getSourceLocations() |
int[] |
getSqlTypes()
Access to the SQL type(s) for this parameter
|
boolean |
isPassNullsEnabled()
How will an unbound value be handled in terms of the JDBC parameter?
|
void |
prepare(CallableStatement statement,
int startIndex)
Prepare for execution.
|
void |
setHibernateType(Type expectedType)
Set the Hibernate mapping type for this parameter.
|
getHibernateType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHibernateType
getType
public ProcedureParameterImpl(ProcedureCallImpl procedureCall, String name, ParameterMode mode, Class<T> javaType, Type hibernateType, boolean initialPassNullsSetting)
public ProcedureParameterImpl(ProcedureCallImpl procedureCall, Integer position, ParameterMode mode, Class<T> javaType, Type hibernateType, boolean initialPassNullsSetting)
public ParameterMode getMode()
ProcedureParameter
ParameterMode.IN
getMode
in interface ParameterRegistration<T>
getMode
in interface ProcedureParameter<T>
public boolean isPassNullsEnabled()
ProcedureParameter
isPassNullsEnabled
in interface ParameterRegistrationImplementor<T>
isPassNullsEnabled
in interface ProcedureParameter<T>
true
here indicates that NULL should be passed; false
indicates
that it is ignored.ParameterRegistrationImplementor.isPassNullsEnabled()
public void enablePassingNulls(boolean enabled)
ProcedureParameter
ParameterRegistration.enablePassingNulls(boolean)
enablePassingNulls
in interface ParameterRegistration<T>
enablePassingNulls
in interface ProcedureParameter<T>
enabled
- true
indicates that the NULL should be passed; false
indicates it should not.ParameterRegistration.enablePassingNulls(boolean)
public int[] getSourceLocations()
getSourceLocations
in interface QueryParameter<T>
public String getName()
Parameter
public Integer getPosition()
Parameter
getPosition
in interface Parameter<T>
getPosition
in interface ParameterRegistration<T>
public void setHibernateType(Type expectedType)
ParameterRegistration
setHibernateType
in interface ParameterRegistration<T>
setHibernateType
in class QueryParameterImpl<T>
expectedType
- The Hibernate mapping type.public Class<T> getParameterType()
Parameter
getParameterType
in interface Parameter<T>
getParameterType
in class QueryParameterImpl<T>
public ParameterBind<T> getBind()
ParameterRegistration
null
if nothing has been bound yet. To bind a value to the parameter use one of the
ParameterRegistration.bindValue(T)
methods.getBind
in interface ParameterRegistration<T>
public void bindValue(Object value)
ParameterRegistration
bindValue
in interface ParameterRegistration<T>
value
- The value to bind.public void bindValue(Object value, TemporalType explicitTemporalType)
ParameterRegistration
bindValue
in interface ParameterRegistration<T>
value
- The value to bindexplicitTemporalType
- An explicitly supplied TemporalType.public void prepare(CallableStatement statement, int startIndex) throws SQLException
ParameterRegistrationImplementor
prepare
in interface ParameterRegistrationImplementor<T>
statement
- The statement about to be executedstartIndex
- The parameter index for this registration (used for positional)SQLException
- Indicates a problem accessing the statement objectpublic int[] getSqlTypes()
ParameterRegistrationImplementor
getSqlTypes
in interface ParameterRegistrationImplementor<T>
public T extract(CallableStatement statement)
ParameterRegistrationImplementor
extract
in interface ParameterRegistrationImplementor<T>
statement
- The callable statementCopyright © 2021 JBoss by Red Hat. All rights reserved.