public class JPAStoredProcedureQuery extends Object implements StoredProcedureQuery
| Modifier and Type | Field and Description |
|---|---|
protected static org.datanucleus.util.Localiser |
LOCALISER
Localisation utility for output messages
|
| Constructor and Description |
|---|
JPAStoredProcedureQuery(javax.persistence.EntityManager em,
org.datanucleus.store.query.Query query) |
| 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.
|
int |
executeUpdate() |
int |
getFirstResult() |
javax.persistence.FlushModeType |
getFlushMode() |
Map<String,Object> |
getHints() |
javax.persistence.LockModeType |
getLockMode() |
int |
getMaxResults() |
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.
|
javax.persistence.Parameter<?> |
getParameter(int position) |
<T> javax.persistence.Parameter<T> |
getParameter(int position,
Class<T> type) |
javax.persistence.Parameter<?> |
getParameter(String name) |
<T> javax.persistence.Parameter<T> |
getParameter(String name,
Class<T> type) |
Set<javax.persistence.Parameter<?>> |
getParameters() |
Object |
getParameterValue(int position) |
<T> T |
getParameterValue(javax.persistence.Parameter<T> param) |
Object |
getParameterValue(String name) |
List |
getResultList() |
Object |
getSingleResult() |
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.
|
boolean |
isBound(javax.persistence.Parameter<?> param) |
StoredProcedureQuery |
registerStoredProcedureParameter(int position,
Class type,
ParameterMode mode)
Register a positional parameter.
|
StoredProcedureQuery |
registerStoredProcedureParameter(String parameterName,
Class type,
ParameterMode mode)
Register a named parameter.
|
javax.persistence.Query |
setFirstResult(int startPosition) |
StoredProcedureQuery |
setFlushMode(javax.persistence.FlushModeType mode)
Set the flush mode type to be used for the query execution.
|
StoredProcedureQuery |
setHint(String hintName,
Object value)
Set a query property or hint.
|
javax.persistence.Query |
setLockMode(javax.persistence.LockModeType arg0) |
javax.persistence.Query |
setMaxResults(int max) |
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 cal,
javax.persistence.TemporalType type)
Bind an instance of java.util.Calendar to a Parameter object.
|
StoredProcedureQuery |
setParameter(javax.persistence.Parameter<Date> param,
Date date,
javax.persistence.TemporalType type)
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.
|
<T> T |
unwrap(Class<T> cls) |
protected static final org.datanucleus.util.Localiser LOCALISER
public JPAStoredProcedureQuery(javax.persistence.EntityManager em,
org.datanucleus.store.query.Query query)
public javax.persistence.FlushModeType getFlushMode()
getFlushMode in interface javax.persistence.Querypublic StoredProcedureQuery setFlushMode(javax.persistence.FlushModeType mode)
StoredProcedureQuerysetFlushMode in interface StoredProcedureQuerysetFlushMode in interface javax.persistence.Querymode - flush modepublic javax.persistence.LockModeType getLockMode()
getLockMode in interface javax.persistence.Querypublic javax.persistence.Query setLockMode(javax.persistence.LockModeType arg0)
setLockMode in interface javax.persistence.Querypublic Map<String,Object> getHints()
getHints in interface javax.persistence.Querypublic StoredProcedureQuery setHint(String hintName, Object value)
StoredProcedureQuerysetHint in interface StoredProcedureQuerysetHint in interface javax.persistence.QueryhintName - name of the property or hintvalue - value for the property or hintpublic <T> javax.persistence.Parameter<T> getParameter(int position,
Class<T> type)
getParameter in interface javax.persistence.Querypublic javax.persistence.Parameter<?> getParameter(int position)
getParameter in interface javax.persistence.Querypublic <T> javax.persistence.Parameter<T> getParameter(String name, Class<T> type)
getParameter in interface javax.persistence.Querypublic javax.persistence.Parameter<?> getParameter(String name)
getParameter in interface javax.persistence.Querypublic Set<javax.persistence.Parameter<?>> getParameters()
getParameters in interface javax.persistence.Querypublic Object getParameterValue(int position)
getParameterValue in interface javax.persistence.Querypublic <T> T getParameterValue(javax.persistence.Parameter<T> param)
getParameterValue in interface javax.persistence.Querypublic Object getParameterValue(String name)
getParameterValue in interface javax.persistence.Querypublic boolean isBound(javax.persistence.Parameter<?> param)
isBound in interface javax.persistence.Querypublic <T> T unwrap(Class<T> cls)
unwrap in interface javax.persistence.Querypublic <T> StoredProcedureQuery setParameter(javax.persistence.Parameter<T> param, T value)
StoredProcedureQuerysetParameter in interface StoredProcedureQuerysetParameter in interface javax.persistence.Queryparam - parameter objectvalue - parameter valuepublic StoredProcedureQuery setParameter(javax.persistence.Parameter<Calendar> param, Calendar cal, javax.persistence.TemporalType type)
StoredProcedureQuerysetParameter in interface StoredProcedureQuerysetParameter in interface javax.persistence.Queryparam - parameter objectcal - parameter valuetype - temporal typepublic StoredProcedureQuery setParameter(javax.persistence.Parameter<Date> param, Date date, javax.persistence.TemporalType type)
StoredProcedureQuerysetParameter in interface StoredProcedureQuerysetParameter in interface javax.persistence.Queryparam - parameter objectdate - parameter valuetype - temporal typepublic StoredProcedureQuery setParameter(String name, Object value)
StoredProcedureQuerysetParameter in interface StoredProcedureQuerysetParameter in interface javax.persistence.Queryname - parameter namevalue - parameter valuepublic StoredProcedureQuery setParameter(String name, Calendar value, javax.persistence.TemporalType temporalType)
StoredProcedureQuerysetParameter in interface StoredProcedureQuerysetParameter in interface javax.persistence.Queryname - parameter namevalue - parameter valuetemporalType - temporal typepublic StoredProcedureQuery setParameter(String name, Date value, javax.persistence.TemporalType temporalType)
StoredProcedureQuerysetParameter in interface StoredProcedureQuerysetParameter in interface javax.persistence.Queryname - parameter namevalue - parameter valuetemporalType - temporal typepublic StoredProcedureQuery setParameter(int position, Object value)
StoredProcedureQuerysetParameter in interface StoredProcedureQuerysetParameter in interface javax.persistence.Queryposition - positionvalue - parameter valuepublic StoredProcedureQuery setParameter(int position, Calendar value, javax.persistence.TemporalType temporalType)
StoredProcedureQuerysetParameter in interface StoredProcedureQuerysetParameter in interface javax.persistence.Queryposition - positionvalue - parameter valuetemporalType - temporal typepublic StoredProcedureQuery setParameter(int position, Date value, javax.persistence.TemporalType temporalType)
StoredProcedureQuerysetParameter in interface StoredProcedureQuerysetParameter in interface javax.persistence.Queryposition - positionvalue - parameter valuetemporalType - temporal typepublic StoredProcedureQuery registerStoredProcedureParameter(int position, Class type, ParameterMode mode)
StoredProcedureQueryregisterStoredProcedureParameter in interface StoredProcedureQueryposition - parameter positiontype - type of the parametermode - parameter modepublic StoredProcedureQuery registerStoredProcedureParameter(String parameterName, Class type, ParameterMode mode)
StoredProcedureQueryregisterStoredProcedureParameter in interface StoredProcedureQueryparameterName - name of the parameter as registered or specified in metadatatype - type of the parametermode - parameter modepublic Object getOutputParameterValue(int position)
StoredProcedureQuerygetOutputParameterValue in interface StoredProcedureQueryposition - parameter positionpublic Object getOutputParameterValue(String parameterName)
StoredProcedureQuerygetOutputParameterValue in interface StoredProcedureQueryparameterName - name of the parameter as registered or specified in metadatapublic boolean execute()
StoredProcedureQueryexecute in interface StoredProcedureQuerypublic boolean hasMoreResults()
StoredProcedureQueryhasMoreResults in interface StoredProcedureQuerypublic int getUpdateCount()
StoredProcedureQuerygetUpdateCount in interface StoredProcedureQuerypublic int executeUpdate()
executeUpdate in interface javax.persistence.Querypublic List getResultList()
getResultList in interface javax.persistence.Querypublic Object getSingleResult()
getSingleResult in interface javax.persistence.Querypublic int getFirstResult()
getFirstResult in interface javax.persistence.Querypublic int getMaxResults()
getMaxResults in interface javax.persistence.Querypublic javax.persistence.Query setFirstResult(int startPosition)
setFirstResult in interface javax.persistence.Querypublic javax.persistence.Query setMaxResults(int max)
setMaxResults in interface javax.persistence.QueryCopyright © 2012. All Rights Reserved.