![JAR search and dependency download from the Maven repository](/logo.png)
org.hibernate.cache.redis.util.HibernateCacheUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-redis Show documentation
Show all versions of hibernate-redis Show documentation
Hibernate second level cache with Redis
The newest version!
package org.hibernate.cache.redis.util;
import org.hibernate.SessionFactory;
import org.hibernate.internal.SessionFactoryImpl;
import org.hibernate.persister.entity.EntityPersister;
/**
* Hibernate utility class
*
* @author [email protected]
* @since 13. 9. 26. 오후 4:49
*/
public final class HibernateCacheUtil {
public static String getRegionName(SessionFactory sessionFactory, Class entityClass) {
EntityPersister p = ((SessionFactoryImpl) sessionFactory).getEntityPersister(entityClass.getName());
return p.hasCache()
? p.getCacheAccessStrategy().getRegion().getName()
: "";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy