TypedQuery, StoredProcedureQuery, Parameter
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the number of entities updated or deletedExecute an update or delete statement. |
| public int | Returns: position of the first resultThe position of the first result the query object was set to retrieve. |
| public FlushModeType | |
| public Map | Returns: query properties and hintsGet the properties and hints and associated values that are in effect for the query instance. |
| public LockModeType | |
| public int | Returns: maximum number of resultsThe maximum number of results the query object was set to retrieve. |
| public Parameter | Returns: parameter objectparameter name name)Get the parameter object corresponding to the declared parameter of the given name. |
| public <T> Parameter | Returns: parameter objectparameter name name, Class<T> type type)Get the parameter object corresponding to the declared parameter of the given name and type. |
| public Parameter | Returns: parameter objectposition position)Get the parameter object corresponding to the declared positional parameter with the given position. |
| public <T> Parameter | Returns: parameter objectposition position, Class<T> type type)Get the parameter object corresponding to the declared positional parameter with the given position and type. |
| public Set | Returns: set of the parameter objectsGet the parameter objects corresponding to the declared parameters of the query. |
| public <T> T | Returns: parameter valueparameter object param)Return the input value bound to the parameter. |
| public Object | Returns: parameter valueparameter name name)Return the input value bound to the named parameter. |
| public Object | Returns: parameter valueposition position)Return the input value bound to the positional parameter. |
| public List | Returns: a list of the resultsExecute a SELECT query and return the query results as an untyped List. |
| public default Stream | Returns: a stream of the resultsExecute a SELECT query and return the query results
as an untyped |
| public Object | |
| public boolean | |
| public Query | Returns: the same query instanceposition of the first result,
numbered from 0 startPosition)Set the position of the first result to retrieve. |
| public Query | Returns: the same query instanceflush mode flushMode)Set the flush mode type to be used for the query execution. |
| public Query | |
| public Query | Returns: the same query instancelock mode lockMode)Set the lock mode type to be used for the query execution. |
| public Query | Returns: the same query instancemaximum number of results to retrieve maxResult)Set the maximum number of results to retrieve. |
| public <T> Query | Returns: the same query instanceparameter object param, T parameter value value)Bind the value of a |
| public Query | Returns: the same query instanceparameter object param, Calendar parameter value value, TemporalType temporal type temporalType)Bind an instance of |
| public Query | Returns: the same query instanceparameter object param, Date parameter value value, TemporalType temporal type temporalType)Bind an instance of |
| public Query | Returns: the same query instanceparameter name name, Object parameter value value)Bind an argument value to a named parameter. |
| public Query | Returns: the same query instanceparameter name name, Calendar parameter value value, TemporalType temporal type temporalType)Bind an instance of |
| public Query | Returns: the same query instanceparameter name name, Date parameter value value, TemporalType temporal type temporalType)Bind an instance of |
| public Query | Returns: the same query instanceposition position, Object parameter value value)Bind an argument value to a positional parameter. |
| public Query | Returns: the same query instanceposition position, Calendar parameter value value, TemporalType temporal type temporalType)Bind an instance of |
| public Query | Returns: the same query instanceposition position, Date parameter value value, TemporalType temporal type temporalType)Bind an instance of |
| public <T> T |
| executeUpdate | back to summary |
|---|---|
| public int executeUpdate() Execute an update or delete statement.
| |
| getFirstResult | back to summary |
|---|---|
| public int getFirstResult() The position of the first result the query object was set to
retrieve. Returns 0 if
| |
| getFlushMode | back to summary |
|---|---|
| public FlushModeType getFlushMode() Get the flush mode in effect for the query execution. If a flush mode has not been set for the query object, returns the flush mode in effect for the entity manager.
| |
| getHints | back to summary |
|---|---|
| public Map Get the properties and hints and associated values that are in effect for the query instance. | |
| getLockMode | back to summary |
|---|---|
| public LockModeType getLockMode() Get the current lock mode for the query. Returns null if a lock mode has not been set on the query object.
| |
| getMaxResults | back to summary |
|---|---|
| public int getMaxResults() The maximum number of results the query object was set to
retrieve. Returns
| |
| getParameter | back to summary |
|---|---|
| public Parameter Get the parameter object corresponding to the declared parameter of the given name. This method is not required to be supported for native queries.
| |
| getParameter | back to summary |
|---|---|
| public <T> Parameter Get the parameter object corresponding to the declared parameter of the given name and type. This method is required to be supported for criteria queries only.
| |
| getParameter | back to summary |
|---|---|
| public Parameter Get the parameter object corresponding to the declared positional parameter with the given position. This method is not required to be supported for native queries.
| |
| getParameter | back to summary |
|---|---|
| public <T> Parameter Get the parameter object corresponding to the declared positional parameter with the given position and type. This method is not required to be supported by the provider.
| |
| getParameters | back to summary |
|---|---|
| public Set Get the parameter objects corresponding to the declared parameters of the query. Returns empty set if the query has no parameters. This method is not required to be supported for native queries.
| |
| getParameterValue | back to summary |
|---|---|
| public <T> T getParameterValue(Parameter<T> param) Return the input value bound to the parameter. (Note that OUT parameters are unbound.)
| |
| getParameterValue | back to summary |
|---|---|
| public Object getParameterValue(String name) Return the input value bound to the named parameter. (Note that OUT parameters are unbound.)
| |
| getParameterValue | back to summary |
|---|---|
| public Object getParameterValue(int position) Return the input value bound to the positional parameter. (Note that OUT parameters are unbound.)
| |
| getResultList | back to summary |
|---|---|
| public List Execute a SELECT query and return the query results as an untyped List.
| |
| getResultStream | back to summary |
|---|---|
| public default Stream Execute a SELECT query and return the query results
as an untyped
| |
| getSingleResult | back to summary |
|---|---|
| public Object getSingleResult() Execute a SELECT query that returns a single untyped result.
| |
| isBound | back to summary |
|---|---|
| public boolean isBound(Parameter<?> param) Return a boolean indicating whether a value has been bound to the parameter.
| |
| setFirstResult | back to summary |
|---|---|
| public Query setFirstResult(int startPosition) Set the position of the first result to retrieve.
| |
| setFlushMode | back to summary |
|---|---|
| public Query setFlushMode(FlushModeType flushMode) Set the flush mode type to be used for the query execution. The flush mode type applies to the query regardless of the flush mode type in use for the entity manager.
| |
| setHint | back to summary |
|---|---|
| public Query setHint(String hintName, Object value) Set a query property or hint. The hints elements may be used to specify query properties and hints. Properties defined by this specification must be observed by the provider. Vendor-specific hints that are not recognized by a provider must be silently ignored. Portable applications should not rely on the standard timeout hint. Depending on the database in use and the locking mechanisms used by the provider, this hint may or may not be observed.
| |
| setLockMode | back to summary |
|---|---|
| public Query setLockMode(LockModeType lockMode) Set the lock mode type to be used for the query execution.
| |
| setMaxResults | back to summary |
|---|---|
| public Query setMaxResults(int maxResult) Set the maximum number of results to retrieve.
| |
| setParameter | back to summary |
|---|---|
| public <T> Query setParameter(Parameter<T> param, T value) Bind the value of a
| |
| setParameter | back to summary |
|---|---|
| public Query setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public Query setParameter(Parameter<Date> param, Date value, TemporalType temporalType) Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public Query setParameter(String name, Object value) Bind an argument value to a named parameter.
| |
| setParameter | back to summary |
|---|---|
| public Query setParameter(String name, Calendar value, TemporalType temporalType) Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public Query setParameter(String name, Date value, TemporalType temporalType) Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public Query setParameter(int position, Object value) Bind an argument value to a positional parameter.
| |
| setParameter | back to summary |
|---|---|
| public Query setParameter(int position, Calendar value, TemporalType temporalType) Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public Query setParameter(int position, Date value, TemporalType temporalType) Bind an instance of
| |
| unwrap | back to summary |
|---|---|
| public <T> T unwrap(Class<T> cls) Return an object of the specified type to allow access to
the provider-specific API. If the provider's query
implementation does not support the specified class, the
| |