Uses of Interface
javax.persistence.Query
Packages that use Query
Package
Description
Jakarta Persistence is the API for the management for persistence and object/relational mapping.
-
Uses of Query in javax.persistence
Subinterfaces of Query in javax.persistenceModifier and TypeInterfaceDescriptioninterfaceInterface used to control stored procedure query execution.interfaceTypedQuery<X>Interface used to control the execution of typed queries.Fields in javax.persistence declared as QueryModifier and TypeFieldDescription(package private) QueryQueryTimeoutException.queryThe query object that caused the exceptionMethods in javax.persistence that return QueryModifier and TypeMethodDescriptionEntityManager.createNamedQuery(String name) Create an instance ofQueryfor executing a named query (in the Jakarta Persistence query language or in native SQL).EntityManager.createNativeQuery(String sqlString) Create an instance ofQueryfor executing a native SQL statement, e.g., for update or delete.EntityManager.createNativeQuery(String sqlString, Class resultClass) Create an instance ofQueryfor executing a native SQL query.EntityManager.createNativeQuery(String sqlString, String resultSetMapping) Create an instance ofQueryfor executing a native SQL query.EntityManager.createQuery(String qlString) Create an instance ofQueryfor executing a Jakarta Persistence query language statement.EntityManager.createQuery(CriteriaDelete deleteQuery) Create an instance ofQueryfor executing a criteria delete query.EntityManager.createQuery(CriteriaUpdate updateQuery) Create an instance ofQueryfor executing a criteria update query.QueryTimeoutException.getQuery()Returns the query that caused this exception.Query.setFirstResult(int startPosition) Set the position of the first result to retrieve.Query.setFlushMode(FlushModeType flushMode) Set the flush mode type to be used for the query execution.Set a query property or hint.Query.setLockMode(LockModeType lockMode) Set the lock mode type to be used for the query execution.Query.setMaxResults(int maxResult) Set the maximum number of results to retrieve.Query.setParameter(int position, Object value) Bind an argument value to a positional parameter.Query.setParameter(int position, Calendar value, TemporalType temporalType) Bind an instance ofjava.util.Calendarto a positional parameter.Query.setParameter(int position, Date value, TemporalType temporalType) Bind an instance ofjava.util.Dateto a positional parameter.Query.setParameter(String name, Object value) Bind an argument value to a named parameter.Query.setParameter(String name, Calendar value, TemporalType temporalType) Bind an instance ofjava.util.Calendarto a named parameter.Query.setParameter(String name, Date value, TemporalType temporalType) Bind an instance ofjava.util.Dateto a named parameter.Query.setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) Bind an instance ofjava.util.Calendarto aParameterobject.Query.setParameter(Parameter<Date> param, Date value, TemporalType temporalType) Bind an instance ofjava.util.Dateto aParameterobject.<T> QueryQuery.setParameter(Parameter<T> param, T value) Bind the value of aParameterobject.Methods in javax.persistence with parameters of type QueryModifier and TypeMethodDescriptionvoidEntityManagerFactory.addNamedQuery(String name, Query query) Define the query, typed query, or stored procedure query as a named query such that future query objects can be created from it using thecreateNamedQueryorcreateNamedStoredProcedureQuerymethod.Constructors in javax.persistence with parameters of type QueryModifierConstructorDescriptionQueryTimeoutException(String message, Throwable cause, Query query) Constructs a newQueryTimeoutExceptionexception with the specified detail message, cause, and query.QueryTimeoutException(Query query) Constructs a newQueryTimeoutExceptionexception with the specified query.