Hi,
I am storing the data inside a cahe. How can i retrieve the data from a cache into session.
public Country findCountryByCode(String code) {
return (Country) SessionManager.currentSession()
.createQuery("from Country as c where c.code = :code")
.setParameter("code",code)
.uniqueResult();
}
and i change the hibernate.cfg.xml
<property name="hibernate.cache.provider_class">
org.hibernate.cache.EHCacheProvider
</property>
Now the data is stored inside a cache.
Now i want to retrieve the cache data into session.
Please provide any code to store the cache data into session.
|