Package org.hibernate.cfg

Examples of org.hibernate.cfg.ExtendsQueueEntry


    List<String> names = locateEntityNamesAwaitingExtends( metadataXml, mappingBinder );
    if ( !names.isEmpty() ) {
      // classes mentioned in extends not available - so put it in queue
      for ( String name : names ) {
        metadata.getExtendsQueue().add( new ExtendsQueueEntry( name, mappingBinder.getPackageName(), metadataXml, entityNames ) );
      }
      return;
    }

    mappingBinder.processElement();
View Full Code Here


  }

  public int processExtendsQueue() {
    LOG.debug( "processing extends queue" );
    int added = 0;
    ExtendsQueueEntry extendsQueueEntry = findPossibleExtends();
    while ( extendsQueueEntry != null ) {
      metadata.getMetadataSourceQueue().processHbmXml( extendsQueueEntry.getMetadataXml(), extendsQueueEntry.getEntityNames() );
      extendsQueueEntry = findPossibleExtends();
    }

    if ( extendsQueue.size() > 0 ) {
      Iterator iterator = extendsQueue.iterator();
      StringBuffer buf = new StringBuffer( "Following super classes referenced in extends not found: " );
      while ( iterator.hasNext() ) {
        final ExtendsQueueEntry entry = ( ExtendsQueueEntry ) iterator.next();
        buf.append( entry.getExplicitName() );
        if ( entry.getMappingPackage() != null ) {
          buf.append( "[" ).append( entry.getMappingPackage() ).append( "]" );
        }
        if ( iterator.hasNext() ) {
          buf.append( "," );
        }
      }
View Full Code Here

  }

  protected ExtendsQueueEntry findPossibleExtends() {
    Iterator<ExtendsQueueEntry> itr = extendsQueue.iterator();
    while ( itr.hasNext() ) {
      final ExtendsQueueEntry entry = itr.next();
      boolean found = metadata.getEntityBinding( entry.getExplicitName() ) == null
          && metadata.getEntityBinding( HbmHelper.getClassName( entry.getExplicitName(), entry.getMappingPackage() ) ) != null;
      if ( found ) {
        itr.remove();
        return entry;
      }
    }
View Full Code Here

  }

  protected ExtendsQueueEntry findPossibleExtends() {
    Iterator<ExtendsQueueEntry> itr = extendsQueue.iterator();
    while ( itr.hasNext() ) {
      final ExtendsQueueEntry entry = itr.next();
      boolean found = metadata.getEntityBinding( entry.getExplicitName() ) == null
          && metadata.getEntityBinding( HbmHelper.getClassName( entry.getExplicitName(), entry.getMappingPackage() ) ) != null;
      if ( found ) {
        itr.remove();
        return entry;
      }
    }
View Full Code Here

TOP

Related Classes of org.hibernate.cfg.ExtendsQueueEntry

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.