Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] cacheQueryResults in JPA ?

There is not currently a JPA query hint to do this (feel free to log a bug to
get this added), so you need to use a SessionCustomizer to customize the JPA
query using Java code.  You should be able to get any JPA named query from
the EclipseLink Session's named queries, and call cacheQueryResults() on it.



Gustav Trede-2 wrote:
> 
>  hello,
> 
> Im trying to enable query result set caching, but i fail to understand 
> how to do it in JPA .
> 
> ELUG example is:
> ReadObjectQuery query = new ReadObjectQuery(SurveillanceCompany.class);
> query.cacheQueryResults();
> SurveillanceCompany  sc = (SurveillanceCompany) 
> session.executeQuery(query);
> 
> thanks
>   gustav
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> 
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/J2SE-Caching-Strategy--tp17192160p18449258.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top