JPA Method
in jakarta.persistence.EntityManager

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


Create an instance of TypedQuery 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
Return:
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:
getNamedQueries()
NamedQuery
NamedNativeQuery
Since:
JPA 1.0