Package org.hibernate.cache

Examples of org.hibernate.cache.CacheKey


    EntityPersister p = getEntityPersister( persistentClass.getName() );
    if ( p.hasCache() ) {
      if ( log.isDebugEnabled() ) {
        log.debug( "evicting second-level cache: " + MessageHelper.infoString(p, id, this) );
      }
      CacheKey cacheKey = new CacheKey( id, p.getIdentifierType(), p.getRootEntityName(), EntityMode.POJO, this );
      p.getCacheAccessStrategy().evict( cacheKey );
    }
  }
View Full Code Here


    CollectionPersister p = getCollectionPersister( roleName );
    if ( p.hasCache() ) {
      if ( log.isDebugEnabled() ) {
        log.debug( "evicting second-level cache: " + MessageHelper.collectionInfoString(p, id, this) );
      }
      CacheKey cacheKey = new CacheKey( id, p.getKeyType(), p.getRole(), EntityMode.POJO, this );
      p.getCacheAccessStrategy().evict( cacheKey );
    }
  }
View Full Code Here

      final EntityPersister persister,
      final EntityKey keyToLoad,
      final LoadEventListener.LoadType options,
      final SessionImplementor source) {
    SoftLock lock = null;
    final CacheKey ck;
    if ( persister.hasCache() ) {
      ck = new CacheKey(
          event.getEntityId(),
          persister.getIdentifierType(),
          persister.getRootEntityName(),
          source.getEntityMode(),
          source.getFactory()
View Full Code Here

    if ( useCache ) {

      final SessionFactoryImplementor factory = source.getFactory();

      final CacheKey ck = new CacheKey(
          event.getEntityId(),
          persister.getIdentifierType(),
          persister.getRootEntityName(),
          source.getEntityMode(),
          source.getFactory()
View Full Code Here

      final EntityPersister persister,
      final EntityKey keyToLoad,
      final LoadEventListener.LoadType options,
      final SessionImplementor source) {
    SoftLock lock = null;
    final CacheKey ck;
    if ( persister.hasCache() ) {
      ck = new CacheKey(
          event.getEntityId(),
          persister.getIdentifierType(),
          persister.getRootEntityName(),
          source.getEntityMode(),
          source.getFactory()
View Full Code Here

    if ( useCache ) {

      final SessionFactoryImplementor factory = source.getFactory();

      final CacheKey ck = new CacheKey(
          event.getEntityId(),
          persister.getIdentifierType(),
          persister.getRootEntityName(),
          source.getEntityMode(),
          source.getFactory()
View Full Code Here

          entityEntry.isLoadedWithLazyPropertiesUnfetched(),
          version,
          session,
          entity
      );
      CacheKey cacheKey = new CacheKey(
          id,
          persister.getIdentifierType(),
          persister.getRootEntityName(),
          session.getEntityMode(),
          session.getFactory()
View Full Code Here

    else {
      version = null;
    }

    CollectionCacheEntry entry = new CollectionCacheEntry( lce.getCollection(), persister );
    CacheKey cacheKey = new CacheKey(
        lce.getKey(),
        persister.getKeyType(),
        persister.getRole(),
        session.getEntityMode(),
        session.getFactory()
View Full Code Here

  private boolean isCached(
      EntityKey entityKey,
      EntityPersister persister,
      EntityMode entityMode) {
    if ( persister.hasCache() ) {
      CacheKey key = new CacheKey(
          entityKey.getIdentifier(),
          persister.getIdentifierType(),
          entityKey.getEntityName(),
          entityMode,
          context.getSession().getFactory()
View Full Code Here

  private boolean isCached(
      Serializable collectionKey,
      CollectionPersister persister,
      EntityMode entityMode) {
    if ( persister.hasCache() ) {
      CacheKey cacheKey = new CacheKey(
          collectionKey,
              persister.getKeyType(),
              persister.getRole(),
              entityMode,
              context.getSession().getFactory()
View Full Code Here

TOP

Related Classes of org.hibernate.cache.CacheKey

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.