ObjectDB Database Search
1-50 of 146 resultsjakarta.persistence.TypedQuery Jakarta Persistence (JPA) Interface jakarta.persistence. TypedQuery Type Parameters: - query result ... ) explains how to use TypedQuery . Public Instance Methods int executeUpdate () Execute an update or delete ... has been bound. Since: Jakarta Persistence (JPA) 2.0 TypedQuery setCacheRetrieveMode ( CacheRetrieveMode | |
jakarta.persistence.TypedQuery.setParameter(Parameter,Date,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setParameter ( Parameter param , Date value , TemporalType temporalType ) Bind an instance of Date to a Parameter object. Parameters: temporalType - temporal type param - parameter | |
jakarta.persistence.TypedQuery.setParameter(String,Object) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setParameter ( String name , Object value ) Bind an argument value to a named parameter. Parameters: name - parameter name value - parameter value Returns: the same query instance. Throws | |
jakarta.persistence.TypedQuery.setParameter(String,Calendar,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setParameter ( String name , Calendar value , TemporalType temporalType ) Bind an instance of Calendar to a named parameter. Parameters: name - parameter name temporalType | |
jakarta.persistence.TypedQuery.setParameter(String,Date,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setParameter ( String name , Date value , TemporalType temporalType ) Bind an instance of Date to a named parameter. Parameters: name - parameter name temporalType - temporal type | |
jakarta.persistence.TypedQuery.setFirstResult(int) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setFirstResult ( int startPosition ) Set the position of the first result to retrieve. Parameters: startPosition - position of the first result, numbered from 0 Returns: the same query instance. Throws | |
jakarta.persistence.TypedQuery.setHint(String,Object) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery 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 | |
jakarta.persistence.TypedQuery.setParameter(Parameter,T) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setParameter ( Parameter param , T value ) Bind the value of a Parameter object. Parameters: param - parameter object value - parameter value Returns: the same query instance. Throws | |
jakarta.persistence.TypedQuery.setParameter(Parameter,Calendar,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setParameter ( Parameter param , Calendar value , TemporalType temporalType ) Bind an instance of Calendar to a Parameter object. Parameters: temporalType - temporal type param | |
jakarta.persistence.TypedQuery.setLockMode(LockModeType) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setLockMode ( LockModeType lockMode ) Set the lock mode type to be used for the query execution. Parameters: lockMode - lock mode Returns: the same query instance. Throws: IllegalStateException | |
jakarta.persistence.TypedQuery.setCacheRetrieveMode(CacheRetrieveMode) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setCacheRetrieveMode ( CacheRetrieveMode cacheRetrieveMode ) Set the cache retrieval mode that is in effect during query execution. This cache retrieval mode overrides the cache retrieve mode in use by | |
jakarta.persistence.TypedQuery.setCacheStoreMode(CacheStoreMode) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setCacheStoreMode ( CacheStoreMode cacheStoreMode ) 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 | |
jakarta.persistence.TypedQuery.setTimeout(Integer) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setTimeout ( Integer timeout ) Set the query timeout, in milliseconds. This is a hint, and is an alternative to setting the hint jakarta.persistence.query.timeout . Parameters: timeout - the timeout, in | |
jakarta.persistence.TypedQuery.setParameter(int,Object) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setParameter ( int position , Object value ) Bind an argument value to a positional parameter. Parameters: position - position value - parameter value Returns: the same query instance. Throws | |
jakarta.persistence.TypedQuery.setParameter(int,Calendar,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setParameter ( int position , Calendar value , TemporalType temporalType ) Bind an instance of Calendar to a positional parameter. Parameters: position - position temporalType | |
jakarta.persistence.TypedQuery.setParameter(int,Date,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setParameter ( int position , Date value , TemporalType temporalType ) Bind an instance of Date to a positional parameter. Parameters: position - position temporalType - temporal | |
jakarta.persistence.TypedQuery.setFlushMode(FlushModeType) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery 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 | |
jakarta.persistence.TypedQuery.setMaxResults(int) Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery TypedQuery setMaxResults ( int maxResult ) Set the maximum number of results to retrieve. Parameters: maxResult - maximum number of results to retrieve Returns: the same query instance. Throws: IllegalArgumentException | |
jakarta.persistence.TypedQuery.getResultStream() Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery Stream getResultStream() Execute a SELECT query and return the query result as a typed Stream . By default, this method delegates to getResultList().stream() , however, persistence provider may choose to override this method | |
jakarta.persistence.TypedQuery.getSingleResult() Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery X getSingleResult() Execute a SELECT query that returns a single result. Returns: the result, of type X . Throws: IllegalStateException - if called for a Jakarta Persistence query language UPDATE or DELETE statement | |
jakarta.persistence.TypedQuery.getSingleResultOrNull() Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery X getSingleResultOrNull() Execute a SELECT query that returns a single untyped result. Returns: the result, of type X , or null if there is no result. Throws: IllegalStateException - if called for a Jakarta Persistence query | |
jakarta.persistence.TypedQuery.getResultList() Jakarta Persistence (JPA) Method in jakarta.persistence. TypedQuery List getResultList() Execute a SELECT query and return the query results as a typed List . Returns: a list of the results, each of type X , or an empty list if there are no results. Throws: IllegalStateException - if called | |
JPA Query API, which was the only query interface in JPA 1, and the TypedQuery interface, which was introduced in JPA 2. The TypedQuery interface extends the Query interface. Use the Query interface primarily when the query ... is Object . When a more specific result type is expected, use the TypedQuery interface. The TypedQuery | |
Running JPA Queries. Similarly, the TypedQuery interface defines the following methods: TypedQuery .getSingleResult () : Use when exactly one result object is expected. TypedQuery .getResultList () : Use in any other case. In ... to run this query, as it can return multiple objects: TypedQuery query = em. createQuery ("SELECT c FROM | |
Query Parameters in JPA, String name) { TypedQuery query = em. createQuery ( "SELECT c FROM Country c WHERE c.name = :name ... chaining by returning the TypedQuery instance on which it was invoked. This allows you to chain ... ( EntityManager em, String name) { TypedQuery query = em. createQuery ( "SELECT c FROM Country c WHERE c.name | |
JPA Criteria API Queries expression. After building the CriteriaQuery , you use it to create a TypedQuery object, which you can then execute: TypedQuery query = em. createQuery (q); List results = query. getResultList ... can be executed more concisely: TypedQuery query = em. createQuery ("SELECT c FROM Country c", Country.class | |
TypedQuery implementation problems Hi everyone, I'm having problems. I have implemented TypedQuery in a module of my web system and everything works perfectly. but when making another module and implementing TypedQuery ... ; TypedQuery query = em.createQuery( "select new com.javatmp.module.accounting.entity.Account(" + "acct | |
SELECT clause (JPQL / Criteria API) query returns Country objects, which then become managed by the EntityManager instance em : TypedQuery ... of the previous query are returned as a list of String values: TypedQuery query = em. createQuery ( "SELECT ... demonstrates how to run this query and process the results: TypedQuery query = em. createQuery ( "SELECT c | |
JPA Named Queries Queries at Runtime At runtime, named queries are represented by the Query and TypedQuery interfaces ... takes a query name and a result type and returns a TypedQuery instance: TypedQuery query = em | |
Setting and Tuning of JPA Queries The Query and TypedQuery interfaces define various methods for setting and tuning query execution . To take effect, you must invoke these methods before running a query with getResultList or ... because the setter methods in Query and TypedQuery support method chaining by returning the query object | |
jakarta.persistence.EntityManager accepts LockOption s. See Also: Query TypedQuery CriteriaQuery PersistenceContext ... , TypedQuery , or StoredProcedureQuery obtained from it throws the IllegalStateException ... .0 TypedQuery createNamedQuery ( String name , Class resultClass ) Create an instance of TypedQuery | |
JPA Named Queries Annotations. Retrieve it by result type from EntityManagerFactory.getNamedQueries , and use it to get a TypedQuery instance via EntityManager.createQuery . | |
FROM clause (JPQL / Criteria API): TypedQuery query = em. createQuery ("SELECT c FROM Country c", Country.class); List results = query | |
JPA Queries TypedQuery in modern applications to ensure compile-time type safety. A sub-interface of Query used | |
JPA Criteria Queries to EntityManager.createQuery to obtain a TypedQuery . For nested queries within a main query, use | |
Online Backup, for example, to wait for the backup to complete. TypedQuery backupQuery = em.createQuery("objectdb backup | |
jakarta.persistence.FlushModeType within a transaction, if AUTO is set on the Query or TypedQuery object, or if the flush mode setting ... TypedQuery object, the persistence provider is responsible for ensuring that all updates to the state | |
jakarta.persistence.NonUniqueResultException Thrown by the persistence provider when Query.getSingleResult or TypedQuery .getSingleResult is executed ... transaction, if one is active, to be marked for rollback. See Also: Query.getSingleResult() TypedQuery | |
jakarta.persistence.NoResultException the persistence provider when Query.getSingleResult or TypedQuery .getSingleResult is executed ... , to be marked for rollback. See Also: Query.getSingleResult() TypedQuery .getSingleResult() Since: Jakarta | |
jakarta.persistence.EntityManager.createQuery(CriteriaQuery) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager TypedQuery createQuery ( CriteriaQuery criteriaQuery ) Create an instance of TypedQuery for executing a criteria query. Parameters: criteriaQuery - a criteria query object Returns: the new query instance. Throws | |
jakarta.persistence.EntityManager.createQuery(CriteriaSelect) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager TypedQuery createQuery ( CriteriaSelect selectQuery ) Create an instance of TypedQuery for executing a criteria query, which may be a union or intersection of top-level queries. Parameters: selectQuery - a criteria | |
jakarta.persistence.EntityManager.createQuery(TypedQueryReference) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager TypedQuery createQuery ( TypedQueryReference reference ) Create an instance of TypedQuery for executing a named query written in the Jakarta Persistence query language or in native SQL. Parameters: reference | |
jakarta.persistence.EntityManager.createQuery(String,Class) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager TypedQuery createQuery ( String qlString , Class resultClass ) Create an instance of TypedQuery for executing a Jakarta Persistence query language statement. The select list of the query must contain | |
jakarta.persistence.EntityManager.createNamedQuery(String,Class) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager TypedQuery createNamedQuery ( String name , Class resultClass ) Create an instance of TypedQuery for executing a Jakarta Persistence query language named query. The select list of the query must contain | |
jakarta.persistence.LockModeType refresh() ), or to Query.setLockMode or TypedQuery .setLockMode . Optimistic locks are specified using | |
jakarta.persistence.EntityManagerFactory query - a Query , TypedQuery , or StoredProcedureQuery Since: Jakarta Persistence (JPA) 2.1 R | |
Step 3: Define an EJB Session Bean.persistence.PersistenceContext; import javax.persistence. TypedQuery ; @Stateless public class GuestDao ... getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class | |
Step 3: Define a Spring DAO Component.persistence. TypedQuery ; import org.springframework.stereotype.Component; import org.springframework ... () { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return | |
Step 3: Define a Spring DAO Component javax.persistence. TypedQuery ; import org.springframework.stereotype.Component; import org ... getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return | |
Step 3: Define an EJB Session Bean.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence. TypedQuery ... ); } // Retrieves all the guests: public List getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM |