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) |
protected |
AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall,
Integer position,
ParameterMode mode,
Class<T> type,
Type hibernateType) |
protected |
AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall,
String name,
ParameterMode mode,
Class<T> type) |
protected |
AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall,
String name,
ParameterMode mode,
Class<T> type,
Type hibernateType) |
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.
|
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.
|
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)
protected AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall, Integer position, ParameterMode mode, Class<T> type, Type hibernateType)
protected AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall, String name, ParameterMode mode, Class<T> type)
protected AbstractParameterRegistrationImpl(ProcedureCallImpl procedureCall, String name, ParameterMode mode, Class<T> type, Type hibernateType)
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 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 © 2001-2017 Red Hat, Inc. All Rights Reserved.