Package org.hibernate.cache.spi.entry

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


              key.getEntityName()
          ),
          persister.getCacheAccessStrategy()
      );
      if ( cachedEntry != null ) {
        CacheEntry entry = (CacheEntry) persister.getCacheEntryStructure().destructure( cachedEntry, factory );
        return ( (ReferenceCacheEntryImpl) entry ).getReference();
      }
    }

    final Object object;
View Full Code Here


      commitOrRollbackTx();
    }

    assertEquals( slcs.getPutCount(), 2 );

    CacheEntry entry = (CacheEntry) slcs.getEntries().get( i.getId() );
    Serializable[] ser = entry.getDisassembledState();
    assertTrue( ser[0].equals( "widget" ) );
    assertTrue( ser[1].equals( "A bog standard item" ) );

    beginTx();
    try {
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

              key.getEntityName()
          ),
          persister.getCacheAccessStrategy()
      );
      if ( cachedEntry != null ) {
        CacheEntry entry = (CacheEntry) persister.getCacheEntryStructure().destructure( cachedEntry, factory );
        return ( (ReferenceCacheEntryImpl) entry ).getReference();
      }
    }

    final Object object;
View Full Code Here

    if ( ce == null ) {
      // nothing was found in cache
      return null;
    }

    CacheEntry entry = (CacheEntry) persister.getCacheEntryStructure().destructure( ce, factory );
    Object entity = convertCacheEntryToEntity( entry, event.getEntityId(), persister, event );
   
    if ( !persister.isInstance( entity ) ) {
      throw new WrongClassException(
          "loaded object was of wrong class " + entity.getClass(),
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

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

      Object version = Versioning.getVersion(hydratedState, persister);
      CacheEntry entry = new CacheEntry(
          hydratedState,
          persister,
          entityEntry.isLoadedWithLazyPropertiesUnfetched(),
          version,
          session,
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

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.