ObjectDB Database Search

1-50 of 144 results

jakarta.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 interface available for representing queries in JPA 1, and the new TypedQuery interface that was introduced in JPA 2. The TypedQuery interface extends the Query interface. In JPA 2 the Query interface ... . When a more specific result type is expected queries should usually use the TypedQuery interface. It is easier to run

Running JPA Queries

other case. Similarly, the TypedQuery interface defines the following methods: TypedQuery .getSingleResult - for use when exactly one result object is expected. TypedQuery .getResultList ... objects in return: TypedQuery query = em. createQuery ("SELECT c FROM Country c", Country.class); List

Query Parameters in JPA

getCountryByName( EntityManager em, String name) { TypedQuery query = em. createQuery ( "SELECT c FROM ... method supports method chaining (by returning the same TypedQuery instance on which it was invoked ... ( EntityManager em, String name) { TypedQuery query = em. createQuery ( "SELECT c FROM Country c

JPA Criteria API Queries

expression. CriteriaQuery TypedQuery TypedQuery TypedQuery query = em. createQuery (q); List results ... queries, since the equivalent JPQL query could simply be executed as follows: TypedQuery query ... = query. getResultList (); Because eventually both types of queries are represented by a TypedQuery

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)

, the following query returns Country objects that become managed by the EntityManager em : TypedQuery query ... of the above query are received as a list of String values: TypedQuery query = em. createQuery ( "SELECT ... this query and processing the results: TypedQuery query = em. createQuery ( "SELECT c.name, c.capital

JPA Queries

Queries are represented in JPA by the Query and TypedQuery interfaces: The JPA Query API ... these interfaces to build and run JPQL queries. The TypedQuery interface (or alternatively the older Query ... a TypedQuery or a Query instance. Building a dynamic query using the criteria API is managed by the 

JPA Named Queries

at Runtime Named queries are represented at runtime by the same Query and TypedQuery interfaces ... receives 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 setting and tuning methods that may affect query execution if invoked before a query is run using getResultList or getSingleResult ... 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

FROM clause (JPQL / Criteria API)

iteration: TypedQuery query =     em. createQuery ("SELECT c FROM Country c", Country

Online Backup

; TypedQuery backupQuery =     em.createQuery("objectdb backup", Thread.class);  

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

jakarta.persistence.Query

Jakarta Persistence (JPA) Interface jakarta.persistence.Query Interface used to control query execution. See Also: TypedQuery StoredProcedureQuery Parameter Since: Jakarta Persistence (JPA) 1.0 Chapter 4 - JPA Queries (JPQL / Criteria) explains how to use Query . Public Instance Methods int

jakarta.persistence.Parameter

Jakarta Persistence (JPA) Interface jakarta.persistence.Parameter Type Parameters: - the type of the parameter Type for query parameter objects. See Also: Query TypedQuery Since: Jakarta Persistence (JPA) 2.0 Chapter 4 - JPA Queries (JPQL / Criteria) explains how to use Parameter . Public Instance

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