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

x33g5p2x  于2022-01-30 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(156)

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

Settings.getMaximumFetchDepth介绍

暂无

代码示例

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

private boolean isOuterJoinFetchingDisabled() {
  return new Integer(0).equals( sessionFactory().getSettings().getMaximumFetchDepth() );
}

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

protected FetchStrategy adjustJoinFetchIfNeeded(
    AssociationAttributeDefinition attributeDefinition, FetchStrategy fetchStrategy) {
  if ( lockMode.greaterThan( LockMode.READ ) ) {
    return new FetchStrategy( fetchStrategy.getTiming(), FetchStyle.SELECT );
  }
  final Integer maxFetchDepth = sessionFactory().getSettings().getMaximumFetchDepth();
  if ( maxFetchDepth != null && currentDepth() > maxFetchDepth ) {
    return new FetchStrategy( fetchStrategy.getTiming(), FetchStyle.SELECT );
  }
  if ( attributeDefinition.getType().isCollectionType() && isTooManyCollections() ) {
    // todo : have this revert to batch or subselect fetching once "sql gen redesign" is in place
    return new FetchStrategy( fetchStrategy.getTiming(), FetchStyle.SELECT );
  }
  return fetchStrategy;
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

protected boolean isTooDeep(int currentDepth) {
  Integer maxFetchDepth = getFactory().getSettings().getMaximumFetchDepth();
  return maxFetchDepth!=null && currentDepth >= maxFetchDepth.intValue();
}

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

protected boolean isTooDeep(int currentDepth) {
  Integer maxFetchDepth = getFactory().getSettings().getMaximumFetchDepth();
  return maxFetchDepth!=null && currentDepth >= maxFetchDepth.intValue();
}

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

protected boolean isTooDeep(int currentDepth) {
  Integer maxFetchDepth = getFactory().getSettings().getMaximumFetchDepth();
  return maxFetchDepth!=null && currentDepth >= maxFetchDepth.intValue();
}

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

protected boolean isTooDeep(int currentDepth) {
  Integer maxFetchDepth = getFactory().getSettings().getMaximumFetchDepth();
  return maxFetchDepth!=null && currentDepth >= maxFetchDepth.intValue();
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

/**
 * Should we join this association?
 */
protected boolean isJoinable(
  final int joinType,
  final Set visitedAssociationKeys, 
  final String lhsTable,
  final String[] lhsColumnNames,
  final AssociationType type,
  final int depth
) {
  if (joinType<0) return false;
  
  if (joinType==JoinFragment.INNER_JOIN) return true;
  
  Integer maxFetchDepth = getFactory().getSettings().getMaximumFetchDepth();
  final boolean tooDeep = maxFetchDepth!=null && 
    depth >= maxFetchDepth.intValue();
  
  return !tooDeep && !isDuplicateAssociation(lhsTable, lhsColumnNames, type);
}

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

/**
 * Should we join this association?
 */
protected boolean isJoinable(
    final JoinType joinType,
    final Set visitedAssociationKeys,
    final String lhsTable,
    final String[] lhsColumnNames,
    final AssociationType type,
    final int depth) {
  if ( joinType == JoinType.NONE ) {
    return false;
  }
  
  if ( joinType == JoinType.INNER_JOIN ) {
    return true;
  }
  Integer maxFetchDepth = getFactory().getSettings().getMaximumFetchDepth();
  final boolean tooDeep = maxFetchDepth!=null && depth >= maxFetchDepth.intValue();
  
  return !tooDeep && !isDuplicateAssociation(lhsTable, lhsColumnNames, type);
}

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

/**
 * Should we join this association?
 */
protected boolean isJoinable(
    final JoinType joinType,
    final Set visitedAssociationKeys,
    final String lhsTable,
    final String[] lhsColumnNames,
    final AssociationType type,
    final int depth) {
  if ( joinType == JoinType.NONE ) {
    return false;
  }
  
  if ( joinType == JoinType.INNER_JOIN ) {
    return true;
  }
  Integer maxFetchDepth = getFactory().getSettings().getMaximumFetchDepth();
  final boolean tooDeep = maxFetchDepth!=null && depth >= maxFetchDepth.intValue();
  
  return !tooDeep && !isDuplicateAssociation(lhsTable, lhsColumnNames, type);
}

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

/**
 * Should we join this association?
 */
protected boolean isJoinable(
  final int joinType,
  final Set visitedAssociationKeys, 
  final String lhsTable,
  final String[] lhsColumnNames,
  final AssociationType type,
  final int depth
) {
  if (joinType<0) return false;
  
  if (joinType==JoinFragment.INNER_JOIN) return true;
  
  Integer maxFetchDepth = getFactory().getSettings().getMaximumFetchDepth();
  final boolean tooDeep = maxFetchDepth!=null && 
    depth >= maxFetchDepth.intValue();
  
  return !tooDeep && !isDuplicateAssociation(
    visitedAssociationKeys, 
    lhsTable, 
    lhsColumnNames, 
    type
  );    
}

相关文章

Settings类方法