About results

manual

SELECT clause (JPQL / Criteria API)

Explains how to use the SELECT clause and projections in a JPA/JPQL query.... , Country. class ) ; List<Country> results = query. getResultList getResultList() TypedQuery's method Execute a SELECT query and return the query results as a typed List. See JavaDoc Reference Page... ( ...

 
manual

Setting and Tuning of JPA Queries

Explains various JPA query settings - result range, flush and lock.... method Execute a SELECT query and return the query results as a typed List. See JavaDoc Reference Page... or ... TypedQuery's method Set the maximum number of results to retrieve. See JavaDoc Reference Page... methods enable ...

 
api-jpa

Criteria Query Selection and Results

Reference (JavaDoc) of JPA query criteria result interfaces, including Selection, CompoundSelection, Order and Tuple.... the SELECT and ORDER BY clauses and for representing query results as tuples. SELECT Clause Elements The content of the ... section for more details and examples. Query Results as Tuples JPA 2 introduces a new way to represent multi ...

 
manual

Running JPA Queries

Explains how to use JPA to run Java Persistence Query Language (JPQL) queries.... method Execute a SELECT query and return the query results as an untyped List. See JavaDoc Reference Page... - for ... method Execute a SELECT query and return the query results as a typed List. See JavaDoc Reference Page... - for ...

 
api-jpa

javax.persistence.criteria.CriteriaQuery

The CriteriaQuery interface defines functionality that is specific to top-level queries.(Interface of JPA)

 
api-jdo

javax.jdo.Query

The Query interface allows applications to obtain persistent instances, values, and aggregate data from the data store.(Interface of JDO)

 
forum_thread

composite index not used in query

we defined a composite index for class Action: @Index(name="ssst",members={"startDate","state","subType","type"}) and an index for the OneToMany @OneToMany(fetch=FetchType.LAZY) @Index  public List<ObjectNode> objectsInCharge = new ArrayList<ObjectNode>(); on running a query like ... instances.   [ Step 1b ] Filter the results of step 1a retaining only results that satisfy: ( a.startDate > :1 ) .   [ ...

 
api-jpa

javax.persistence.criteria.Subquery

The Subquery interface defines functionality that is specific to subqueries.(Interface of JPA)

 
forum_thread

java.lang.ClassCastException in query results

I have a simple object stored in a ObjectDb file Stadium Name (java.lang.String) Capacity (int) City (java.lang.String)   When i run the following code i get the ClassCastException in the "for (Stadium result : results)" line ... i get the ClassCastException in the "for (Stadium result : results)" line TypedQuery<Stadium> query = em. createQuery ... s" , Stadium. class ) ; List<Stadium> results = query. getResultList ( ) ; for ( ...

 
api-jpa

getResultList()

Execute a SELECT query and return the query results as a typed List.(Method of javax.persistence.TypedQuery)