|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StoredProcedureQuery
Interface used to control stored procedure query execution.
Query
,
Parameter
Method Summary | ||
---|---|---|
boolean |
execute()
Return 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. |
|
java.lang.Object |
getOutputParameterValue(int position)
Retrieve a value passed back from the procedure through an INOUT or OUT parameter. |
|
java.lang.Object |
getOutputParameterValue(java.lang.String parameterName)
Retrieve a value passed back from the procedure through an INOUT or OUT parameter. |
|
int |
getUpdateCount()
Return the update count or -1 if there is no pending result or if the next result is not an update count. |
|
boolean |
hasMoreResults()
Return 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,
java.lang.Class type,
ParameterMode mode)
Register a positional parameter. |
|
StoredProcedureQuery |
registerStoredProcedureParameter(java.lang.String parameterName,
java.lang.Class type,
ParameterMode mode)
Register a named parameter. |
|
StoredProcedureQuery |
setFlushMode(FlushModeType flushMode)
Set the flush mode type to be used for the query execution. |
|
StoredProcedureQuery |
setHint(java.lang.String hintName,
java.lang.Object value)
Set a query property or hint. |
|
StoredProcedureQuery |
setParameter(int position,
java.util.Calendar value,
TemporalType temporalType)
Bind an instance of java.util.Calendar to a positional parameter. |
|
StoredProcedureQuery |
setParameter(int position,
java.util.Date value,
TemporalType temporalType)
Bind an instance of java.util.Date to a positional parameter. |
|
StoredProcedureQuery |
setParameter(int position,
java.lang.Object value)
Bind an argument to a positional parameter. |
|
StoredProcedureQuery |
setParameter(Parameter<java.util.Calendar> param,
java.util.Calendar value,
TemporalType temporalType)
Bind an instance of java.util.Calendar to a Parameter object. |
|
StoredProcedureQuery |
setParameter(Parameter<java.util.Date> param,
java.util.Date value,
TemporalType temporalType)
Bind an instance of java.util.Date to a Parameter object. |
|
|
setParameter(Parameter<T> param,
T value)
Bind the value of a Parameter object. |
|
StoredProcedureQuery |
setParameter(java.lang.String name,
java.util.Calendar value,
TemporalType temporalType)
Bind an instance of java.util.Calendar to a named parameter. |
|
StoredProcedureQuery |
setParameter(java.lang.String name,
java.util.Date value,
TemporalType temporalType)
Bind an instance of java.util.Date to a named parameter. |
|
StoredProcedureQuery |
setParameter(java.lang.String name,
java.lang.Object value)
Bind an argument to a named parameter. |
Methods inherited from interface javax.persistence.Query |
---|
executeUpdate, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getResultList, getSingleResult, isBound, setFirstResult, setLockMode, setMaxResults, unwrap |
Method Detail |
---|
StoredProcedureQuery setHint(java.lang.String hintName, java.lang.Object value)
setHint
in interface Query
hintName
- name of the property or hintvalue
- value for the property or hint
java.lang.IllegalArgumentException
- if the second argument is not
valid for the implementation<T> StoredProcedureQuery setParameter(Parameter<T> param, T value)
setParameter
in interface Query
param
- parameter objectvalue
- parameter value
java.lang.IllegalArgumentException
- if the parameter does not
correspond to a parameter of the queryStoredProcedureQuery setParameter(Parameter<java.util.Calendar> param, java.util.Calendar value, TemporalType temporalType)
setParameter
in interface Query
param
- parameter objectvalue
- parameter valuetemporalType
- temporal type
java.lang.IllegalArgumentException
- if the parameter does not
correspond to a parameter of the queryStoredProcedureQuery setParameter(Parameter<java.util.Date> param, java.util.Date value, TemporalType temporalType)
setParameter
in interface Query
param
- parameter objectvalue
- parameter valuetemporalType
- temporal type
java.lang.IllegalArgumentException
- if the parameter does not
correspond to a parameter of the queryStoredProcedureQuery setParameter(java.lang.String name, java.lang.Object value)
setParameter
in interface Query
name
- parameter namevalue
- parameter value
java.lang.IllegalArgumentException
- if the parameter name does
not correspond to a parameter of the query or if the
argument is of incorrect typeStoredProcedureQuery setParameter(java.lang.String name, java.util.Calendar value, TemporalType temporalType)
setParameter
in interface Query
name
- parameter namevalue
- parameter valuetemporalType
- temporal type
java.lang.IllegalArgumentException
- if the parameter name does
not correspond to a parameter of the query or if the
value argument is of incorrect typeStoredProcedureQuery setParameter(java.lang.String name, java.util.Date value, TemporalType temporalType)
setParameter
in interface Query
name
- parameter namevalue
- parameter valuetemporalType
- temporal type
java.lang.IllegalArgumentException
- 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, java.lang.Object value)
setParameter
in interface Query
position
- positionvalue
- parameter value
java.lang.IllegalArgumentException
- if position does not
correspond to a positional parameter of the query
or if the argument is of incorrect typeStoredProcedureQuery setParameter(int position, java.util.Calendar value, TemporalType temporalType)
setParameter
in interface Query
position
- positionvalue
- parameter valuetemporalType
- temporal type
java.lang.IllegalArgumentException
- if position does not
correspond to a positional parameter of the query or
if the value argument is of incorrect typeStoredProcedureQuery setParameter(int position, java.util.Date value, TemporalType temporalType)
setParameter
in interface Query
position
- positionvalue
- parameter valuetemporalType
- temporal type
java.lang.IllegalArgumentException
- if position does not
correspond to a positional parameter of the query or
if the value argument is of incorrect typeStoredProcedureQuery setFlushMode(FlushModeType flushMode)
setFlushMode
in interface Query
flushMode
- flush mode
StoredProcedureQuery registerStoredProcedureParameter(int position, java.lang.Class type, ParameterMode mode)
position
- parameter positiontype
- type of the parametermode
- parameter mode
StoredProcedureQuery registerStoredProcedureParameter(java.lang.String parameterName, java.lang.Class type, ParameterMode mode)
parameterName
- name of the parameter as registered or
specified in metadatatype
- type of the parametermode
- parameter mode
java.lang.Object getOutputParameterValue(int position)
position
- parameter position
java.lang.IllegalArgumentException
- if the position does
not correspond to a parameter of the query or is
not an INOUT or OUT parameterjava.lang.Object getOutputParameterValue(java.lang.String parameterName)
parameterName
- name of the parameter as registered or
specified in metadata
java.lang.IllegalArgumentException
- if the parameter name does
not correspond to a parameter of the query or is
not an INOUT or OUT parameterboolean execute()
QueryTimeoutException
- if the query execution exceeds
the query timeout value set and only the statement is
rolled back
PersistenceException
- if the query execution exceeds
the query timeout value set and the transaction
is rolled backboolean hasMoreResults()
QueryTimeoutException
- if the query execution exceeds
the query timeout value set and only the statement is
rolled back
PersistenceException
- if the query execution exceeds
the query timeout value set and the transaction
is rolled backint getUpdateCount()
QueryTimeoutException
- if the query execution exceeds
the query timeout value set and only the statement is
rolled back
PersistenceException
- if the query execution exceeds
the query timeout value set and the transaction
is rolled back
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |