Package org.hibernate.cache

Examples of org.hibernate.cache.CacheKey


  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

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

      version = null;
      versionComparator = 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

    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

      // 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

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.