Package org.hibernate.engine

Examples of org.hibernate.engine.SessionImplementor.generateCacheKey()


      version = persister.getVersion( instance, session.getEntityMode() );
    }

    final CacheKey ck;
    if ( persister.hasCache() ) {
      ck = session.generateCacheKey( id, persister.getIdentifierType(), persister.getRootEntityName() );
      lock = persister.getCacheAccessStrategy().lockItem( ck, version );
    }
    else {
      ck = null;
    }
View Full Code Here


      previousVersion = persister.getVersion( instance, session.getEntityMode() );
    }
   
    final CacheKey ck;
    if ( persister.hasCache() ) {
      ck = session.generateCacheKey(
          id,
          persister.getIdentifierType(),
          persister.getRootEntityName()
      );
      lock = persister.getCacheAccessStrategy().lockItem( ck, previousVersion );
View Full Code Here

          session,
          instance
        );
     
      cacheEntry = persister.getCacheEntryStructure().structure(ce);
      final CacheKey ck = session.generateCacheKey( id, persister.getIdentifierType(), persister.getRootEntityName() );
      boolean put = persister.getCacheAccessStrategy().insert( ck, cacheEntry, version );
     
      if ( put && factory.getStatistics().isStatisticsEnabled() ) {
        factory.getStatisticsImplementor().secondLevelCachePut( getPersister().getCacheAccessStrategy().getRegion().getName() );
      }
View Full Code Here

    else {
      version = null;
    }

    CollectionCacheEntry entry = new CollectionCacheEntry( lce.getCollection(), persister );
    CacheKey cacheKey = session.generateCacheKey( lce.getKey(), persister.getKeyType(), persister.getRole() );
    boolean put = persister.getCacheAccessStrategy().putFromLoad(
        cacheKey,
        persister.getCacheEntryStructure().structure(entry),
        session.getTimestamp(),
        version,
View Full Code Here

    if ( useCache ) {

      final SessionFactoryImplementor factory = source.getFactory();

      final CacheKey ck = source.generateCacheKey(
          event.getEntityId(),
          persister.getIdentifierType(),
          persister.getRootEntityName()
      );
      Object ce = persister.getCacheAccessStrategy().get( ck, source.getTimestamp() );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.