Query, Parameter
| Modifier and Type | Method and Description |
|---|---|
| public List | Returns: a list of the results, each of typeX, or an
empty list if there are no resultsRedeclares jakarta. Execute a SELECT query and return the query results as a typed
|
| public default Stream | Returns: a stream of the results, each of typeX, or an
empty stream if there are no resultsOverrides default jakarta. Execute a SELECT query and return the query result as a typed
|
| public X | Returns: the result, of typeXRedeclares jakarta. Execute a SELECT query that returns a single result. |
| public X | Returns: the result, of typeX, or null if there is no
resultRedeclares jakarta. Execute a SELECT query that returns a single untyped result. |
| public TypedQuery | Returns: the same query instancecache retrieval mode cacheRetrieveMode)Redeclares jakarta. Set the cache retrieval mode that is in effect during query execution. |
| public TypedQuery | Returns: the same query instancecache storage mode cacheStoreMode)Redeclares jakarta. Set the cache storage mode that is in effect during query execution. |
| public TypedQuery | Returns: the same query instanceposition of the first result,
numbered from 0 startPosition)Redeclares jakarta. Set the position of the first result to retrieve. |
| public TypedQuery | Returns: the same query instanceflush mode flushMode)Redeclares jakarta. Set the flush mode type to be used for the query execution. |
| public TypedQuery | Returns: the same query instancename of property or hint hintName, Object value for the property or hint value)Redeclares jakarta. Set a query property or hint. |
| public TypedQuery | Returns: the same query instancelock mode lockMode)Redeclares jakarta. Set the lock mode type to be used for the query execution. |
| public TypedQuery | Returns: the same query instancemaximum number of results to retrieve maxResult)Redeclares jakarta. Set the maximum number of results to retrieve. |
| public <T> TypedQuery | Returns: the same query instanceparameter object param, T parameter value value)Redeclares jakarta. Bind the value of a |
| public TypedQuery | Returns: the same query instanceparameter object param, Calendar parameter value value, TemporalType temporal type temporalType)Redeclares jakarta.
Deprecated
since 3.2. Newly-written code should use the date/time types
defined in
java..
Bind an instance of |
| public TypedQuery | Returns: the same query instanceparameter object param, Date parameter value value, TemporalType temporal type temporalType)Redeclares jakarta.
Deprecated
since 3.2. Newly-written code should use the date/time types
defined in
java..
Bind an instance of |
| public TypedQuery | Returns: the same query instanceparameter name name, Object parameter value value)Redeclares jakarta. Bind an argument value to a named parameter. |
| public TypedQuery | Returns: the same query instanceparameter name name, Calendar parameter value value, TemporalType temporal type temporalType)Redeclares jakarta.
Deprecated
since 3.2. Newly-written code should use the date/time types
defined in
java..
Bind an instance of |
| public TypedQuery | Returns: the same query instanceparameter name name, Date parameter value value, TemporalType temporal type temporalType)Redeclares jakarta.
Deprecated
since 3.2. Newly-written code should use the date/time types
defined in
java..
Bind an instance of |
| public TypedQuery | Returns: the same query instanceposition position, Object parameter value value)Redeclares jakarta. Bind an argument value to a positional parameter. |
| public TypedQuery | Returns: the same query instanceposition position, Calendar parameter value value, TemporalType temporal type temporalType)Redeclares jakarta.
Deprecated
since 3.2. Newly-written code should use the date/time types
defined in
java..
Bind an instance of |
| public TypedQuery | Returns: the same query instanceposition position, Date parameter value value, TemporalType temporal type temporalType)Redeclares jakarta.
Deprecated
since 3.2. Newly-written code should use the date/time types
defined in
java..
Bind an instance of |
| public TypedQuery | Returns: the same query instancethe timeout, in milliseconds, or null to
indicate no timeout timeout)Redeclares jakarta. Set the query timeout, in milliseconds. |
| getResultList | back to summary |
|---|---|
| public List Redeclares jakarta. Execute a SELECT query and return the query results as a typed
| |
| getResultStream | back to summary |
|---|---|
| public default Stream Overrides default jakarta. Execute a SELECT query and return the query result as a typed
By default, this method delegates to
| |
| getSingleResult | back to summary |
|---|---|
| public X getSingleResult() Redeclares jakarta. Execute a SELECT query that returns a single result.
| |
| getSingleResultOrNull | back to summary |
|---|---|
| public X getSingleResultOrNull() Redeclares jakarta. Execute a SELECT query that returns a single untyped result.
| |
| setCacheRetrieveMode | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Set the cache retrieval mode that is in effect during query execution. This cache retrieval mode overrides the cache retrieve mode in use by the entity manager.
| |
| setCacheStoreMode | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Set the cache storage mode that is in effect during query execution. This cache storage mode overrides the cache storage mode in use by the entity manager.
| |
| setFirstResult | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Set the position of the first result to retrieve.
| |
| setFlushMode | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. 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 TypedQuery Redeclares jakarta. 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 TypedQuery Redeclares jakarta. Set the lock mode type to be used for the query execution.
| |
| setMaxResults | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Set the maximum number of results to retrieve.
| |
| setParameter | back to summary |
|---|---|
| public <T> TypedQuery Redeclares jakarta. Bind the value of a
| |
| setParameter | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Bind an argument value to a named parameter.
| |
| setParameter | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Bind an argument value to a positional parameter.
| |
| setParameter | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Bind an instance of
| |
| setTimeout | back to summary |
|---|---|
| public TypedQuery Redeclares jakarta. Set the query timeout, in milliseconds. This is a hint,
and is an alternative to setting
the hint
| |