Jakarta Persistence (JPA) Method

TypedQuery<T> createQuery(
  TypedQueryReference<T> reference
)


Create an instance of TypedQuery<X> for executing a named query written in the Jakarta Persistence query language or in native SQL.
Parameters:
reference - a reference to the query defined in metadata
Returns:
the new query instance.
Throws:
IllegalArgumentException - if a query has not been defined, or if the query string is found to be invalid, or if the query result is found to not be assignable to the specified type.
See Also:
Since:
Jakarta Persistence (JPA) 1.0