public abstract class AbstractParameterRegistrationImpl<T> extends Object implements ParameterRegistrationImplementor<T>
Modifier | Constructor and Description |
---|---|
protected |
AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall,
Integer position,
ParameterMode mode,
Class<T> type,
boolean initialPassNullsSetting) |
protected |
AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall,
Integer position,
ParameterMode mode,
Class<T> type,
Type hibernateType,
boolean initialPassNullsSetting) |
protected |
AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall,
String name,
ParameterMode mode,
Class<T> type,
boolean initialPassNullsSetting) |
protected |
AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall,
String name,
ParameterMode mode,
Class<T> type,
Type hibernateType,
boolean initialPassNullsSetting) |
Modifier and Type | Method and Description |
---|---|
void |
bindValue(T value)
Bind a value to the parameter.
|
void |
bindValue(T 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.
|
Type |
getHibernateType()
Access to the Hibernate type for this parameter registration
|
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).
|
String |
getName()
The name under which this parameter was registered.
|
Integer |
getPosition()
The position at which this parameter was registered.
|
int[] |
getSqlTypes()
Access to the SQL type(s) for this parameter
|
Class<T> |
getType()
Obtain the Java type of parameter.
|
boolean |
isPassNullsEnabled()
If no value is bound for this parameter registration, is the passing of NULL
to the JDBC CallableStatement for that parameter enabled? This effectively controls
whether default values for the argument as defined in the database are applied or not.
|
void |
prepare(CallableStatement statement,
int startIndex)
Prepare for execution.
|
protected SessionImplementor |
session() |
void |
setHibernateType(Type type)
Set the Hibernate mapping type for this parameter.
|
protected AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall, Integer position, ParameterMode mode, Class<T> type, boolean initialPassNullsSetting)
protected AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall, Integer position, ParameterMode mode, Class<T> type, Type hibernateType, boolean initialPassNullsSetting)
protected AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall, String name, ParameterMode mode, Class<T> type, boolean initialPassNullsSetting)
protected AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall, String name, ParameterMode mode, Class<T> type, Type hibernateType, boolean initialPassNullsSetting)
protected SessionImplementor session()
public String getName()
ParameterRegistration
null
which should indicate that
positional registration was used (and therefore ParameterRegistration.getPosition()
should return non-null.getName
in interface ParameterRegistration<T>
public Integer getPosition()
ParameterRegistration
null
which should indicate that
named registration was used (and therefore ParameterRegistration.getName()
should return non-null.getPosition
in interface ParameterRegistration<T>
public Class<T> getType()
ParameterRegistration
ParameterRegistration.setHibernateType(org.hibernate.type.Type)
is called explicitly).getType
in interface ParameterRegistration<T>
public ParameterMode getMode()
ParameterRegistration
getMode
in interface ParameterRegistration<T>
public boolean isPassNullsEnabled()
ParameterRegistrationImplementor
isPassNullsEnabled
in interface ParameterRegistrationImplementor<T>
true
indicates that NULL will be passed to the JDBC driver, effectively disabling
the application of the default argument value defined in the database; false
indicates
that the parameter will simply be ignored, with the assumption that the corresponding argument
defined a default value.public void enablePassingNulls(boolean enabled)
ParameterRegistration
AvailableSettings.PROCEDURE_NULL_PARAM_PASSING
enablePassingNulls
in interface ParameterRegistration<T>
enabled
- true
indicates that the NULL should be passed; false
indicates it should not.public Type getHibernateType()
ParameterRegistrationImplementor
getHibernateType
in interface ParameterRegistrationImplementor<T>
public void setHibernateType(Type type)
ParameterRegistration
setHibernateType
in interface ParameterRegistration<T>
type
- The Hibernate mapping type.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(T value)
ParameterRegistration
bindValue
in interface ParameterRegistration<T>
value
- The value to bind.public void bindValue(T 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 © 2017 JBoss by Red Hat. All rights reserved.