Package org.hibernate

Examples of org.hibernate.AssertionFailure


   * immediate initialization.
   */
  public final void forceInitialization() throws HibernateException {
    if (!initialized) {
      if (initializing) {
        throw new AssertionFailure("force initialize loading collection");
      }
      if (session==null) {
        throw new HibernateException("collection is not associated with any session");
      }
      if ( !session.isConnected() ) {
View Full Code Here


    Dialect dialect = getFactory().getDialect();
    if ( !dialect.supportsVariableLimit() ) {
      return 0;
    }
    if ( !hasMaxRows( selection ) ) {
      throw new AssertionFailure( "no max results set" );
    }
    int firstRow = getFirstRow( selection );
    int lastRow = getMaxOrLimit( selection, dialect );
    boolean hasFirstRow = firstRow > 0 && dialect.supportsLimitOffset();
    boolean reverse = dialect.bindLimitParametersInReverseOrder();
View Full Code Here

      return 0;
    }
  }

  public int[] getNamedParameterLocs(String name) {
    throw new AssertionFailure("no named parameters");
  }
View Full Code Here

      throw sqle;
    }
  }

  protected void autoDiscoverTypes(ResultSet rs) {
    throw new AssertionFailure("Auto discover types not supported in this loader");
   
  }
View Full Code Here

      catch ( CacheException ce ) {
        log.error( "could not release a cache lock", ce );
        // continue loop
      }
      catch ( Exception e ) {
        throw new AssertionFailure( "Exception releasing cache locks", e );
      }
    }
    executions.clear();
  }
View Full Code Here

    //TODO: Should this be an InitializeEntityEventListener??? (watch out for performance!)
 
    final PersistenceContext persistenceContext = session.getPersistenceContext();
    EntityEntry entityEntry = persistenceContext.getEntry(entity);
    if ( entityEntry == null ) {
      throw new AssertionFailure( "possible non-threadsafe access to the session" );
    }
    EntityPersister persister = entityEntry.getPersister();
    Serializable id = entityEntry.getId();
    Object[] hydratedState = entityEntry.getLoadedState();
 
View Full Code Here

    return delayedEntityKey;
  }

  private synchronized EntityKey generateDelayedEntityKey() {
    if ( !isDelayed ) {
      throw new AssertionFailure( "cannot request delayed entity-key for non-delayed post-insert-id generation" );
    }
    return new EntityKey( new DelayedPostInsertIdentifier(), getPersister(), getSession().getEntityMode() );
  }
View Full Code Here

    boolean affectedByFilters = persister.isAffectedByEnabledFilters(session);

    preUpdate();

    if ( !collection.wasInitialized() ) {
      if ( !collection.hasQueuedOperations() ) throw new AssertionFailure( "no queued adds" );
      //do nothing - we only need to notify the cache...
    }
    else if ( !affectedByFilters && collection.empty() ) {
      if ( !emptySnapshot ) persister.remove( id, session );
    }
View Full Code Here

            processer.processListener( listeners[index ] );
          }
        }
      }
      catch ( Exception e ) {
        throw new AssertionFailure( "could not process listeners" );
      }
    }
  }
View Full Code Here

            }
          }
      );
    }
    catch ( Exception e ) {
      throw new AssertionFailure("could not init listeners");
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.AssertionFailure

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.