Package org.hibernate.cache.spi.entry

Examples of org.hibernate.cache.spi.entry.CacheEntry


      if ( persister.isCacheInvalidationRequired() || entry.getStatus()!= Status.MANAGED ) {
        persister.getCacheAccessStrategy().remove( ck );
      }
      else {
        //TODO: inefficient if that cache is just going to ignore the updated state!
        CacheEntry ce = new CacheEntry(
            state,
            persister,
            persister.hasUninitializedLazyProperties( instance ),
            nextVersion,
            getSession(),
View Full Code Here


    if ( hasCache() ) {
      CacheKey cacheKey = session.generateCacheKey( id, getIdentifierType(), getEntityName() );
      Object ce = getCacheAccessStrategy().get( cacheKey, session.getTimestamp() );
      if (ce!=null) {
        CacheEntry cacheEntry = (CacheEntry) getCacheEntryStructure().destructure(ce, factory);
        if ( !cacheEntry.areLazyPropertiesUnfetched() ) {
          //note early exit here:
          return initializeLazyPropertiesFromCache( fieldName, entity, session, entry, cacheEntry );
        }
      }
    }
View Full Code Here

          );
        }
      }

      if ( ce != null ) {
        CacheEntry entry = (CacheEntry) persister.getCacheEntryStructure().destructure( ce, factory );

        // Entity was found in second-level cache...
        return assembleCacheEntry(
            entry,
            event.getEntityId(),
View Full Code Here

    if ( hasCache() ) {
      CacheKey cacheKey = session.generateCacheKey( id, getIdentifierType(), getEntityName() );
      Object ce = getCacheAccessStrategy().get( cacheKey, session.getTimestamp() );
      if (ce!=null) {
        CacheEntry cacheEntry = (CacheEntry) getCacheEntryStructure().destructure(ce, factory);
        if ( !cacheEntry.areLazyPropertiesUnfetched() ) {
          //note early exit here:
          return initializeLazyPropertiesFromCache( fieldName, entity, session, entry, cacheEntry );
        }
      }
    }
View Full Code Here

          );
        }
      }

      if ( ce != null ) {
        CacheEntry entry = (CacheEntry) persister.getCacheEntryStructure().destructure( ce, factory );

        // Entity was found in second-level cache...
        return assembleCacheEntry(
            entry,
            event.getEntityId(),
View Full Code Here

            MessageHelper.infoString( persister, id, session.getFactory() )
        );
      }

      Object version = Versioning.getVersion(hydratedState, persister);
      CacheEntry entry = persister.buildCacheEntry( entity, hydratedState, version, session );
      CacheKey cacheKey = session.generateCacheKey( id, persister.getIdentifierType(), persister.getRootEntityName() );

      // explicit handling of caching for rows just inserted and then somehow forced to be read
      // from the database *within the same transaction*.  usually this is done by
      //     1) Session#refresh, or
View Full Code Here

    if ( hasCache() ) {
      CacheKey cacheKey = session.generateCacheKey( id, getIdentifierType(), getEntityName() );
      Object ce = getCacheAccessStrategy().get( cacheKey, session.getTimestamp() );
      if (ce!=null) {
        CacheEntry cacheEntry = (CacheEntry) getCacheEntryStructure().destructure(ce, factory);
        if ( !cacheEntry.areLazyPropertiesUnfetched() ) {
          //note early exit here:
          return initializeLazyPropertiesFromCache( fieldName, entity, session, entry, cacheEntry );
        }
      }
    }
View Full Code Here

    if ( hasCache() ) {
      CacheKey cacheKey = session.generateCacheKey( id, getIdentifierType(), getEntityName() );
      Object ce = getCacheAccessStrategy().get( cacheKey, session.getTimestamp() );
      if ( ce != null ) {
        CacheEntry cacheEntry = (CacheEntry) getCacheEntryStructure().destructure( ce, getFactory() );
        if ( !cacheEntry.areLazyPropertiesUnfetched() ) {
          // note early exit here:
          return initializeLazyPropertiesFromCache( fieldName, entity, session, entry, cacheEntry );
        }
      }
    }
View Full Code Here

    if ( hasCache() ) {
      CacheKey cacheKey = session.generateCacheKey( id, getIdentifierType(), getEntityName() );
      Object ce = getCacheAccessStrategy().get( cacheKey, session.getTimestamp() );
      if (ce!=null) {
        CacheEntry cacheEntry = (CacheEntry) getCacheEntryStructure().destructure(ce, factory);
        if ( !cacheEntry.areLazyPropertiesUnfetched() ) {
          //note early exit here:
          return initializeLazyPropertiesFromCache( fieldName, entity, session, entry, cacheEntry );
        }
      }
    }
View Full Code Here

    if ( hasCache() ) {
      final CacheKey cacheKey = session.generateCacheKey( id, getIdentifierType(), getEntityName() );
      final Object ce = CacheHelper.fromSharedCache( session, cacheKey, getCacheAccessStrategy() );
      if ( ce != null ) {
        final CacheEntry cacheEntry = (CacheEntry) getCacheEntryStructure().destructure(ce, factory);
        if ( !cacheEntry.areLazyPropertiesUnfetched() ) {
          //note early exit here:
          return initializeLazyPropertiesFromCache( fieldName, entity, session, entry, cacheEntry );
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.hibernate.cache.spi.entry.CacheEntry

Copyright © 2018 www.massapicom. 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.