Package org.hibernate

Examples of org.hibernate.AssertionFailure


   */
  public String foreignKeyColumnName(
      String propertyName, String propertyEntityName, String propertyTableName, String referencedColumnName
  ) {
    String header = propertyName != null ? StringHelper.unqualify( propertyName ) : propertyTableName;
    if (header == null) throw new AssertionFailure("NammingStrategy not properly filled");
    return columnName( header ); //+ "_" + referencedColumnName not used for backward compatibility
  }
View Full Code Here


   */
  public String foreignKeyColumnName(
      String propertyName, String propertyEntityName, String propertyTableName, String referencedColumnName
  ) {
    String header = propertyName != null ? StringHelper.unqualify( propertyName ) : propertyTableName;
    if (header == null) throw new AssertionFailure("NamingStrategy not properly filled");
    return columnName( header ); //+ "_" + referencedColumnName not used for backward compatibility
  }
View Full Code Here

    if ( persister.canExtractIdOutOfEntity() ) {

      Serializable oid = persister.getIdentifier( object, session );
      if (id==null) {
        throw new AssertionFailure("null id in " + persister.getEntityName() + " entry (don't flush the Session after an exception occurs)");
      }
      if ( !persister.getIdentifierType().isEqual( id, oid, entityMode, session.getFactory() ) ) {
        throw new HibernateException(
            "identifier of an instance of " +
            persister.getEntityName() +
View Full Code Here

    // if it was dirtied by a collection only
    int[] dirtyProperties = event.getDirtyProperties();
    if ( event.isDirtyCheckPossible() && dirtyProperties == null ) {
      if ( ! intercepted && !event.hasDirtyCollection() ) {
        throw new AssertionFailure( "dirty, but no dirty properties" );
      }
      dirtyProperties = ArrayHelper.EMPTY_INT_ARRAY;
    }

    // check nullability but do not doAfterTransactionCompletion command execute
View Full Code Here

                                      : pc.getCustomSQLDeleteCheckStyle();
      jk--;
      pc = pc.getSuperclass();
    }
    if ( jk != -1 ) {
      throw new AssertionFailure( "Tablespan does not match height of joined-subclass hiearchy." );
    }

    // PROPERTIES

    int hydrateSpan = getPropertySpan();
View Full Code Here

    for ( int j=0; j<tables.length; j++ ) {
      if ( tableName.equals( tables[j] ) ) {
        return j;
      }
    }
    throw new AssertionFailure("Table " + tableName + " not found");
  }
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

    private final Class proxyClass;
    private final Factory factory;

    public BasicProxyFactoryImpl(Class superClass, Class[] interfaces) {
      if ( superClass == null && ( interfaces == null || interfaces.length < 1 ) ) {
        throw new AssertionFailure( "attempting to build proxy without any superclass or interfaces" );
      }

      Enhancer en = new Enhancer();
      en.setUseCache( false );
      en.setInterceptDuringConstruction( false );
View Full Code Here

  /**
   * Construct a unique identifier for an entity class instance
   */
  public EntityKey(Serializable id, EntityPersister persister, EntityMode entityMode) {
    if ( id == null ) {
      throw new AssertionFailure( "null identifier" );
    }
    this.identifier = id;
    this.entityMode = entityMode;
    this.rootEntityName = persister.getRootEntityName();
    this.entityName = persister.getEntityName();
View Full Code Here

          if ( ownerEntry != null ) {
            ownerId = ownerEntry.getId();
          }
        }
        if ( ownerId == null ) {
          throw new AssertionFailure( "Unable to determine collection owner identifier for orphan-delete processing" );
        }
      }
      EntityKey key = new EntityKey(
          ownerId,
              loadedPersister.getOwnerEntityPersister(),
              session.getEntityMode()
      );
      Object owner = persistenceContext.getEntity(key);
      if ( owner == null ) {
        throw new AssertionFailure(
            "collection owner not associated with session: " +
            loadedPersister.getRole()
        );
      }
      EntityEntry e = persistenceContext.getEntry(owner);
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.