public static String getRegionName(SessionFactory sessionFactory, Class entityClass) { EntityPersister p = ((SessionFactoryImpl) sessionFactory).getEntityPersister(entityClass.getName()); if (p.hasCache()) { return p.getCacheAccessStrategy().getRegion().getName(); } return ""; } }
public static String getRegionName(SessionFactory sessionFactory, Class entityClass) { EntityPersister p = ((SessionFactoryImpl) sessionFactory).getEntityPersister(entityClass.getName()); if (p.hasCache()) { return p.getCacheAccessStrategy().getRegion().getName(); } return ""; } }
public static String getRegionName(SessionFactory sessionFactory, Class entityClass) { EntityPersister p = ((SessionFactoryImpl) sessionFactory).getEntityPersister(entityClass.getName()); if (p.hasCache()) { return p.getCacheAccessStrategy().getRegion().getName(); } return ""; } }
public static String getRegionName(SessionFactory sessionFactory, Class entityClass) { EntityPersister p = ((SessionFactoryImpl) sessionFactory).getEntityPersister(entityClass.getName()); if (p.hasCache()) { return p.getCacheAccessStrategy().getRegion().getName(); } return ""; } }
public static String getRegionName(SessionFactory sessionFactory, Class entityClass) { EntityPersister p = ((SessionFactoryImpl) sessionFactory).getEntityPersister(entityClass.getName()); if (p.hasCache()) { return p.getCacheAccessStrategy().getRegion().getName(); } return ""; } }
public static String getRegionName(SessionFactory sessionFactory, Class entityClass) { EntityPersister p = ((SessionFactoryImpl) sessionFactory).getEntityPersister(entityClass.getName()); if (p.hasCache()) { return p.getCacheAccessStrategy().getRegion().getName(); } return ""; } }
public static String getRegionName(SessionFactory sessionFactory, Class entityClass) { EntityPersister p = ((SessionFactoryImpl) sessionFactory).getEntityPersister(entityClass.getName()); if (p.hasCache()) { return p.getCacheAccessStrategy().getRegion().getName(); } return ""; } }
public static String getRegionName(SessionFactory sessionFactory, Class entityClass) { EntityPersister p = ((SessionFactoryImpl) sessionFactory).getEntityPersister(entityClass.getName()); if (p.hasCache()) { return p.getCacheAccessStrategy().getRegion().getName(); } return ""; } }
public static String getRegionName(SessionFactory sessionFactory, Class entityClass) { EntityPersister p = ((SessionFactoryImpl) sessionFactory).getEntityPersister(entityClass.getName()); if (p.hasCache()) { return p.getCacheAccessStrategy().getRegion().getName(); } return ""; } }
public boolean containsEntity(String entityName, Serializable identifier) { EntityPersister p = getEntityPersister( entityName ); return p.hasCache() && p.getCacheAccessStrategy().getRegion().contains( buildCacheKey( identifier, p ) ); }
public boolean containsEntity(String entityName, Serializable identifier) { EntityPersister p = getEntityPersister( entityName ); return p.hasCache() && p.getCacheAccessStrategy().getRegion().contains( buildCacheKey( identifier, p ) ); }
EntityPersister p = (EntityPersister) iter.next(); if ( p.hasCache() ) { p.getCacheAccessStrategy().getRegion().destroy();
@Override public void doAfterTransactionCompletion(boolean success, SessionImplementor session) throws HibernateException { EntityPersister persister = getPersister(); if ( success && isCachePutEnabled( persister, getSession() ) ) { final CacheKey ck = getSession().generateCacheKey( getId(), persister.getIdentifierType(), persister.getRootEntityName() ); boolean put = persister.getCacheAccessStrategy().afterInsert( ck, cacheEntry, version ); if ( put && getSession().getFactory().getStatistics().isStatisticsEnabled() ) { getSession().getFactory().getStatisticsImplementor() .secondLevelCachePut( getPersister().getCacheAccessStrategy().getRegion().getName() ); } } postCommitInsert(); }
@Override public void doAfterTransactionCompletion(boolean success, SessionImplementor session) throws HibernateException { EntityPersister persister = getPersister(); if ( success && isCachePutEnabled( persister, getSession() ) ) { final CacheKey ck = getSession().generateCacheKey( getId(), persister.getIdentifierType(), persister.getRootEntityName() ); boolean put = persister.getCacheAccessStrategy().afterInsert( ck, cacheEntry, version ); if ( put && getSession().getFactory().getStatistics().isStatisticsEnabled() ) { getSession().getFactory().getStatisticsImplementor() .secondLevelCachePut( getPersister().getCacheAccessStrategy().getRegion().getName() ); } } postCommitInsert(); }
@Override public void doAfterTransactionCompletion(boolean success, SessionImplementor session) throws CacheException { EntityPersister persister = getPersister(); if ( persister.hasCache() ) { final CacheKey ck = getSession().generateCacheKey( getId(), persister.getIdentifierType(), persister.getRootEntityName() ); if ( success && cacheEntry!=null /*!persister.isCacheInvalidationRequired()*/ ) { boolean put = persister.getCacheAccessStrategy().afterUpdate( ck, cacheEntry, nextVersion, previousVersion, lock ); if ( put && getSession().getFactory().getStatistics().isStatisticsEnabled() ) { getSession().getFactory().getStatisticsImplementor().secondLevelCachePut( getPersister().getCacheAccessStrategy().getRegion().getName() ); } } else { persister.getCacheAccessStrategy().unlockItem( ck, lock ); } } postCommitUpdate(); }
@Override public void doAfterTransactionCompletion(boolean success, SessionImplementor session) throws CacheException { EntityPersister persister = getPersister(); if ( persister.hasCache() ) { final CacheKey ck = getSession().generateCacheKey( getId(), persister.getIdentifierType(), persister.getRootEntityName() ); if ( success && cacheEntry!=null /*!persister.isCacheInvalidationRequired()*/ ) { boolean put = persister.getCacheAccessStrategy().afterUpdate( ck, cacheEntry, nextVersion, previousVersion, lock ); if ( put && getSession().getFactory().getStatistics().isStatisticsEnabled() ) { getSession().getFactory().getStatisticsImplementor().secondLevelCachePut( getPersister().getCacheAccessStrategy().getRegion().getName() ); } } else { persister.getCacheAccessStrategy().unlockItem( ck, lock ); } } postCommitUpdate(); }
factory.getStatisticsImplementor().secondLevelCachePut( getPersister().getCacheAccessStrategy().getRegion().getName() );
factory.getStatisticsImplementor().secondLevelCachePut( getPersister().getCacheAccessStrategy().getRegion().getName() );