About result

manual

SELECT clause (JPQL / Criteria API)

Explains how to use the SELECT clause and projections in a JPA/JPQL query.... Multiple SELECT Expressions Result Classes (Constructor Expressions) SELECT DISTINCT ... be returned from a query that uses projection when a result path expression resolves to an entity. For example, the following query ...

 
manual

Setting and Tuning of JPA Queries

Explains various JPA query settings - result range, flush and lock.... method Execute a SELECT query that returns a single result. See JavaDoc Reference Page... . This page covers the following topics: Result Range (setFirstResult, setMaxResults) Flush Mode ...

 
api-jpa

Criteria Query Selection and Results

Reference (JavaDoc) of JPA query criteria result interfaces, including Selection, CompoundSelection, Order and Tuple.... Interface for extracting the elements of a query result tuple. See JavaDoc Reference Page... interface can be used as ...

 
manual

Running JPA Queries

Explains how to use JPA to run Java Persistence Query Language (JPQL) queries.... Execute a SELECT query that returns a single untyped result. See JavaDoc Reference Page... - for use when exactly one result object is expected. Query.getResultList ...

 
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 ... ( a1 ) instances ( for every result of step 1 ) ----------------------------------------- [ ... ( v$1 ) instances ( for every result tuple of the steps above ) ... ( v$1 ) instances ( for every result of step 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 ... code i get the ClassCastException in the "for (Stadium result : results)" line TypedQuery<Stadium> query = em. ... ( ) ; for ( Stadium result : results ) { System. out . println ( ...

 
api-jpa

getResultList()

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