List of usage examples for org.hibernate Cache evictNaturalIdRegions
@Deprecated default void evictNaturalIdRegions()
From source file:cn.guoyukun.spring.jpa.repository.hibernate.HibernateUtils.java
License:Apache License
/** * ?jpa EntityManagerFactory /*from w w w . j a v a 2 s . co m*/ * 1? * 2?? * 3? * ? * jpa Cache api ?evict ? * * @param emf * @see org.hibernate.ejb.EntityManagerFactoryImpl.JPACache#evictAll() */ public static void evictLevel2Cache(EntityManagerFactory emf) { Cache cache = HibernateUtils.getCache(emf); cache.evictEntityRegions(); cache.evictCollectionRegions(); cache.evictDefaultQueryRegion(); cache.evictQueryRegions(); cache.evictNaturalIdRegions(); }
From source file:com.topsem.common.repository.jpa.hibernate.Hibernates.java
License:Apache License
/** * ?jpa EntityManagerFactory /*from w ww .j a v a2s . c om*/ * 1? * 2?? * 3? * ? * jpa Cache api ?evict ? * * @param emf * @see org.hibernate.jpa.internal.EntityManagerFactoryImpl.JPACache#evictAll() */ public static void evictLevel2Cache(EntityManagerFactory emf) { Cache cache = Hibernates.getCache(emf); cache.evictEntityRegions(); cache.evictCollectionRegions(); cache.evictDefaultQueryRegion(); cache.evictQueryRegions(); cache.evictNaturalIdRegions(); }