org.hibernate.cfg.Configuration.findPossibleExtends()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.hibernate.cfg.Configuration.findPossibleExtends()方法的一些代码示例,展示了Configuration.findPossibleExtends()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.findPossibleExtends()方法的具体详情如下:
包路径:org.hibernate.cfg.Configuration
类名称:Configuration
方法名:findPossibleExtends

Configuration.findPossibleExtends介绍

[英]Find the first possible element in the queue of extends.
[中]在扩展队列中查找第一个可能的元素。

代码示例

代码示例来源:origin: hibernate/hibernate

/**
 * Try to empty the extends queue.
 */
private void processExtendsQueue() {
  org.dom4j.Document document = findPossibleExtends();
  while ( document != null ) {
    add( document );
    document = findPossibleExtends();
  }
  if ( extendsQueue.size() > 0 ) {
    Iterator iterator = extendsQueue.keySet().iterator();
    StringBuffer buf = new StringBuffer( "Following superclasses referenced in extends not found: " );
    while ( iterator.hasNext() ) {
      String element = ( String ) iterator.next();
      buf.append( element );
      if ( iterator.hasNext() ) buf.append( "," );
    }
    throw new MappingException( buf.toString() );
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

private int processExtendsQueue() {
  LOG.debug( "Processing extends queue" );
  int added = 0;
  ExtendsQueueEntry extendsQueueEntry = findPossibleExtends();
  while ( extendsQueueEntry != null ) {
    metadataSourceQueue.processHbmXml( extendsQueueEntry.getMetadataXml(), extendsQueueEntry.getEntityNames() );
    extendsQueueEntry = findPossibleExtends();
  }
  if ( extendsQueue.size() > 0 ) {
    Iterator iterator = extendsQueue.keySet().iterator();
    StringBuilder buf = new StringBuilder( "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( "," );
      }
    }
    throw new MappingException( buf.toString() );
  }
  return added;
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

private int processExtendsQueue() {
  LOG.debug( "Processing extends queue" );
  int added = 0;
  ExtendsQueueEntry extendsQueueEntry = findPossibleExtends();
  while ( extendsQueueEntry != null ) {
    metadataSourceQueue.processHbmXml( extendsQueueEntry.getMetadataXml(), extendsQueueEntry.getEntityNames() );
    extendsQueueEntry = findPossibleExtends();
  }
  if ( extendsQueue.size() > 0 ) {
    Iterator iterator = extendsQueue.keySet().iterator();
    StringBuilder buf = new StringBuilder( "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( "," );
      }
    }
    throw new MappingException( buf.toString() );
  }
  return added;
}

相关文章

Configuration类方法