Package org.hibernate.cache

Examples of org.hibernate.cache.CacheKey


      // we have issues with generated-version entities that may have
      // multiple actions queued during the same flush
      version = persister.getVersion( instance, session.getEntityMode() );
    }

    final CacheKey ck;
    if ( persister.hasCache() ) {
      ck = new CacheKey(
          id,
          persister.getIdentifierType(),
          persister.getRootEntityName(),
          session.getEntityMode(),
          session.getFactory()
View Full Code Here


    }
  }

  public void afterTransactionCompletion(boolean success) throws HibernateException {
    if ( getPersister().hasCache() ) {
      final CacheKey ck = new CacheKey(
          getId(),
          getPersister().getIdentifierType(),
          getPersister().getRootEntityName(),
          getSession().getEntityMode(),
          getSession().getFactory()
View Full Code Here

    persister = session.getFactory().getCollectionPersister( collectionRole );
  }

  public void afterTransactionCompletion(boolean success) throws CacheException {
    if ( persister.hasCache() ) {
      final CacheKey ck = new CacheKey(
          key,
          persister.getKeyType(),
          persister.getRole(),
          session.getEntityMode(),
          session.getFactory()
View Full Code Here

    // bidirectional association and it is one of the
    // earlier entity actions which actually updates
    // the database (this action is resposible for
    // second-level cache invalidation only)
    if ( persister.hasCache() ) {
      final CacheKey ck = new CacheKey(
          key,
          persister.getKeyType(),
          persister.getRole(),
          session.getEntityMode(),
          session.getFactory()
View Full Code Here

    }
  }

  protected final void evict() throws CacheException {
    if ( persister.hasCache() ) {
      CacheKey ck = new CacheKey(
          key,
          persister.getKeyType(),
          persister.getRole(),
          session.getEntityMode(),
          session.getFactory()
View Full Code Here

//          MessageHelper.infoString( persister, id, source.getFactory() )
//      );
//    }

    if ( persister.hasCache() ) {
      final CacheKey ck = new CacheKey(
          id,
              persister.getIdentifierType(),
              persister.getRootEntityName(),
              this.getEntityMode(),
              this.getFactory()
View Full Code Here

          session,
          instance
        );
     
      cacheEntry = persister.getCacheEntryStructure().structure(ce);
      final CacheKey ck = new CacheKey(
          id,
          persister.getIdentifierType(),
          persister.getRootEntityName(),
          session.getEntityMode(),
          session.getFactory()
View Full Code Here

  //Make 100% certain that this is called before any subsequent ScheduledUpdate.afterTransactionCompletion()!!
  public void afterTransactionCompletion(boolean success) throws HibernateException {
    EntityPersister persister = getPersister();
    if ( success && isCachePutEnabled( persister, getSession() ) ) {
      final CacheKey ck = new CacheKey(
          getId(),
          persister.getIdentifierType(),
          persister.getRootEntityName(),
          getSession().getEntityMode(),
          getSession().getFactory()
View Full Code Here

          ", field access: " + fieldName
        );
    }

    if ( hasCache() ) {
      CacheKey cacheKey = new CacheKey(id, getIdentifierType(), getEntityName(), session.getEntityMode(), getFactory() );
      Object ce = getCacheAccessStrategy().get( cacheKey, session.getTimestamp() );
      if (ce!=null) {
        CacheEntry cacheEntry = (CacheEntry) getCacheEntryStructure().destructure(ce, factory);
        if ( !cacheEntry.areLazyPropertiesUnfetched() ) {
          //note early exit here:
View Full Code Here

      return result;
    }

    // check to see if it is in the second-level cache
    if ( hasCache() ) {
      CacheKey ck = new CacheKey(
          id,
          getIdentifierType(),
          getRootEntityName(),
          session.getEntityMode(),
          session.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.