ObjectDB Database Search

1-50 of 56 results

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

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

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

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.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

Cast exception?

to database.entity.Player From just fetching a single result: TypedQuery query = em ... TypedQuery with a Player.class ( which might be loaded by a different class loader than the one that in ... ). Please post details about both class loaders. Run the query as Query rather than TypedQuery and then check

Retrieve data of all entity classes in a single query

for all classes TypedQuery query = em.createQuery(tmpQuery, Athlete.class); // I want to avoid this List results ... )? I tried to use TypedQuery instead of TypedQuery but had casting issues   ezazop Akis

New to Product & Having An Issue

()); } @Test public void queryDepById(){ TypedQuery q = em.createNamedQuery("Department.findByPK ... ()); this.foundResult = d; } @Test public void queryDepByIdComponents(){ TypedQuery &lr;Department q = em ... . TypedQuery q = em.createNamedQuery("Department.findAll", Department.class); q.setMaxResults(1000); List

Catching exceptions from online backup

accessible via some API or the  TypedQuery .getSingleResult() would accept a parameter of type ... ;    TypedQuery backupQuery =     em . createQuery ( "objectdb ... . createEntityManager ( ) ; try {      TypedQuery backupQuery = em . createQuery ( "objectdb backup

Embedded List

this to access it. TypedQuery tqItem = emf.createEntityManager().createNamedQuery("ItemDB.getPart", ItemDB.class ... ();             TypedQuery tqItems = em.createQuery

Duplicate Entity class names causes Exception in Query

which) { TypedQuery q = em.createNamedQuery("objdbTest.Singleton.getItem", Item.class); q ... (NoResultException e) { return null; } } public long howManyItemsExist(EntityManager em) { TypedQuery q = em

zip file or JAR manifest missing

the query with TypedQuery : TypedQuery q2 = em.createQuery(sQ2, ItemList.class);   support

Join query problem with new statetment

Hi, I'm trying to implement some reporting logic in my application and got nasty exception when using query with join. The query code is: TypedQuery inspirationQuery = em.createQuery(    ... to: TypedQuery inspirationQuery = em.createQuery( "select new InspirationsPerSupplierResult(insp, p

Need help to make this test work and define proper annotations for entities Lists

javax.persistence.Id; import javax.persistence.Persistence; import javax.persistence. TypedQuery ... ;    TypedQuery query = em.createQuery("SELECT ord FROM OrderDat ord", OrderDat.class

Merge with Parent/Child entities not possible

.persistence. TypedQuery ; import org.junit.After; import org.junit.Assert; import org.junit.Before ... ; closeEntityManager(entityManager); } @Test public void test() {   TypedQuery parentEntityQuery

openejb jpa jaas module

.Persistence; import javax.persistence. TypedQuery ; import javax.security.auth.Subject; import javax ... .getPrincipals(); final int id = info.getId(); final TypedQuery namedQuery = entityManager.createNamedQuery

Query all objects that implements a given interface - is that possible?

Hi, I am trying query one of my DB - for all object types that implement a given interface.      TypedQuery query =         em.createQuery ... ;  TypedQuery query =         em.createQuery("SELECT bk

ClassCastException of same object type

. Yet the TypedQuery should be returning XCCompetitorCount objects! The add() method

JPA inheritance issue with ObjectDB - Field not found in type error

"); System.out.println("JPQL: " + temSQL); System.out.println("Parameters: " + parameters); TypedQuery

Online backup problem

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

Schema-Update: Rename superclass and remove one subclass

; If we try to ecexute a Query (in the second main method): TypedQuery q = em.createQuery("SELECT c

Problem with queries on lists with reverse mapping

= "team" are removed from Team the query returns the expected result. TypedQuery query7 = em.createQuery

Exception on creation when running multithreaded

also had: typedQuery .setFlushMode(FlushModeType.AUTO); for the specific query.   If I change the logic

Query can't see recently persisted object

= oid; } ... } ... TypedQuery query = mem.createNamedQuery("MyObject.findByOid", MyObject.class

Why the internal error was thrown?

();     TypedQuery q = em.createQuery(query, clazz);     q.setHint

@FetchGroup in JPA similar to JDO

as a hint that this query should return Entities with only those fields filled with data: TypedQuery ... _NAME, "names"); This will be equivalent to query using tuples: TypedQuery query = em.createQuery ... to TypedQuery query = em.createQuery("select new Entity(e.firstName, e.lastName) FROM Entity e", Entity