public interface StoredProcedureQuery
extends javax.persistence.Query
Query,
Parameter| Modifier and Type | Method and Description |
|---|---|
boolean |
execute()
Returns true if the first result corresponds to a result set,
and false if it is an update count or if there are no results
other than through INOUT and OUT parameters, if any.
|
Object |
getOutputParameterValue(int position)
Used to retrieve the values passed back from the procedure
through INOUT and OUT parameters.
|
Object |
getOutputParameterValue(String parameterName)
Used to retrieve the values passed back from the procedure
through INOUT and OUT parameters.
|
int |
getUpdateCount()
Returns the update count or -1 if there is no pending result
or if the next result is not an update count.
|
boolean |
hasMoreResults()
Returns true if the next result corresponds to a result set,
and false if it is an update count or if there are no results
other than through INOUT and OUT parameters, if any.
|
StoredProcedureQuery |
registerStoredProcedureParameter(int position,
Class type,
ParameterMode mode)
Register a positional parameter.
|
StoredProcedureQuery |
registerStoredProcedureParameter(String parameterName,
Class type,
ParameterMode mode)
Register a named parameter.
|
StoredProcedureQuery |
setFlushMode(javax.persistence.FlushModeType flushMode)
Set the flush mode type to be used for the query execution.
|
StoredProcedureQuery |
setHint(String hintName,
Object value)
Set a query property or hint.
|
StoredProcedureQuery |
setParameter(int position,
Calendar value,
javax.persistence.TemporalType temporalType)
Bind an instance of java.util.Calendar to a positional parameter.
|
StoredProcedureQuery |
setParameter(int position,
Date value,
javax.persistence.TemporalType temporalType)
Bind an instance of java.util.Date to a positional parameter.
|
StoredProcedureQuery |
setParameter(int position,
Object value)
Bind an argument to a positional parameter.
|
StoredProcedureQuery |
setParameter(javax.persistence.Parameter<Calendar> param,
Calendar value,
javax.persistence.TemporalType temporalType)
Bind an instance of java.util.Calendar to a Parameter object.
|
StoredProcedureQuery |
setParameter(javax.persistence.Parameter<Date> param,
Date value,
javax.persistence.TemporalType temporalType)
Bind an instance of java.util.Date to a Parameter object.
|
<T> StoredProcedureQuery |
setParameter(javax.persistence.Parameter<T> param,
T value)
Bind the value of a Parameter object.
|
StoredProcedureQuery |
setParameter(String name,
Calendar value,
javax.persistence.TemporalType temporalType)
Bind an instance of java.util.Calendar to a named parameter.
|
StoredProcedureQuery |
setParameter(String name,
Date value,
javax.persistence.TemporalType temporalType)
Bind an instance of java.util.Date to a named parameter.
|
StoredProcedureQuery |
setParameter(String name,
Object value)
Bind an argument to a named parameter.
|
executeUpdate, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getResultList, getSingleResult, isBound, setFirstResult, setLockMode, setMaxResults, unwrapStoredProcedureQuery setHint(String hintName, Object value)
setHint in interface javax.persistence.QueryhintName - name of the property or hintvalue - value for the property or hintIllegalArgumentException - if the second argument is not valid for the implementation<T> StoredProcedureQuery setParameter(javax.persistence.Parameter<T> param, T value)
setParameter in interface javax.persistence.Queryparam - parameter objectvalue - parameter valueIllegalArgumentException - if the parameter does not correspond to a parameter of the queryStoredProcedureQuery setParameter(javax.persistence.Parameter<Calendar> param, Calendar value, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.Queryparam - parameter objectvalue - parameter valuetemporalType - temporal typeIllegalArgumentException - if the parameter does not correspond to a parameter of the queryStoredProcedureQuery setParameter(javax.persistence.Parameter<Date> param, Date value, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.Queryparam - parameter objectvalue - parameter valuetemporalType - temporal typeIllegalArgumentException - if the parameter does not correspond to a parameter of the queryStoredProcedureQuery setParameter(String name, Object value)
setParameter in interface javax.persistence.Queryname - parameter namevalue - parameter valueIllegalArgumentException - if the parameter name does not correspond to a parameter of the query or if the
argument is of incorrect typeStoredProcedureQuery setParameter(String name, Calendar value, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.Queryname - parameter namevalue - parameter valuetemporalType - temporal typeIllegalArgumentException - if the parameter name does not correspond to a parameter of the query or if the
value argument is of incorrect typeStoredProcedureQuery setParameter(String name, Date value, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.Queryname - parameter namevalue - parameter valuetemporalType - temporal typeIllegalArgumentException - if the parameter name does not correspond to a parameter of the query or if the
value argument is of incorrect typeStoredProcedureQuery setParameter(int position, Object value)
setParameter in interface javax.persistence.Queryposition - positionvalue - parameter valueIllegalArgumentException - if position does not correspond to a positional parameter of the query
or if the argument is of incorrect typeStoredProcedureQuery setParameter(int position, Calendar value, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.Queryposition - positionvalue - parameter valuetemporalType - temporal typeIllegalArgumentException - if position does not correspond to a positional parameter of the query or
if the value argument is of incorrect typeStoredProcedureQuery setParameter(int position, Date value, javax.persistence.TemporalType temporalType)
setParameter in interface javax.persistence.Queryposition - positionvalue - parameter valuetemporalType - temporal typeIllegalArgumentException - if position does not correspond to a positional parameter of the query or
if the value argument is of incorrect typeStoredProcedureQuery setFlushMode(javax.persistence.FlushModeType flushMode)
setFlushMode in interface javax.persistence.QueryflushMode - flush modeStoredProcedureQuery registerStoredProcedureParameter(int position, Class type, ParameterMode mode)
position - parameter positiontype - type of the parametermode - parameter modeStoredProcedureQuery registerStoredProcedureParameter(String parameterName, Class type, ParameterMode mode)
parameterName - name of the parameter as registered or specified in metadatatype - type of the parametermode - parameter modeObject getOutputParameterValue(int position)
position - parameter positionIllegalArgumentException - if the position does not correspond to a parameter of the query or is
not an INOUT or OUT parameterObject getOutputParameterValue(String parameterName)
parameterName - name of the parameter as registered or specified in metadataIllegalArgumentException - if the parameter name does not correspond to a parameter of the query or is
not an INOUT or OUT parameterboolean execute()
javax.persistence.QueryTimeoutException - if the query execution exceeds
the query timeout value set and only the statement is rolled backjavax.persistence.PersistenceException - if the query execution exceeds the query timeout value set and the transaction
is rolled backboolean hasMoreResults()
javax.persistence.QueryTimeoutException - if the query execution exceeds
the query timeout value set and only the statement is rolled backjavax.persistence.PersistenceException - if the query execution exceeds the query timeout value set and the transaction
is rolled backint getUpdateCount()
javax.persistence.QueryTimeoutException - if the query execution exceeds
the query timeout value set and only the statement is rolled backjavax.persistence.PersistenceException - if the query execution exceeds the query timeout value set and the transaction
is rolled backCopyright © 2012. All Rights Reserved.