File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes 0penJPA QueryCaching Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "0penJPA QueryCaching" Watch "0penJPA QueryCaching" New topic
Author

0penJPA QueryCaching

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
Hi All,

I am trying to cache the query results generated and later on use the results from the cache instead of touching the database.

This is what I am doing to put/get the values from the cache.





The thing I don't understand is how do I get the QueryKey (Referred to as key here in my code) ?

I tried doing this
but the q here in this line of code is supposed to be of type org.apache.openjpa.kernel.Query?


Can anybody help me with this please?

Thanks.


Be Humble... Be Nice.
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
Anybody?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 0penJPA QueryCaching