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

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

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

Settings.isWrapResultSetsEnabled介绍

暂无

代码示例

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

private synchronized ResultSet wrapResultSetIfEnabled(final ResultSet rs, final SessionImplementor session) {
  // synchronized to avoid multi-thread access issues; defined as method synch to avoid
  // potential deadlock issues due to nature of code.
  if ( session.getFactory().getSettings().isWrapResultSetsEnabled() ) {
    try {
      log.debug("Wrapping result set [" + rs + "]");
      return new ResultSetWrapper( rs, retreiveColumnNameToIndexCache( rs ) );
    }
    catch(SQLException e) {
      log.info("Error wrapping result set", e);
      return rs;
    }
  }
  else {
    return rs;
  }
}

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

private synchronized ResultSet wrapResultSetIfEnabled(final ResultSet rs, final SessionImplementor session) {
  // synchronized to avoid multi-thread access issues; defined as method synch to avoid
  // potential deadlock issues due to nature of code.
  if ( session.getFactory().getSettings().isWrapResultSetsEnabled() ) {
    try {
      log.debug("Wrapping result set [" + rs + "]");
      return new ResultSetWrapper( rs, retreiveColumnNameToIndexCache( rs ) );
    }
    catch(SQLException e) {
      log.info("Error wrapping result set", e);
      return rs;
    }
  }
  else {
    return rs;
  }
}

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

private synchronized ResultSet wrapResultSetIfEnabled(final ResultSet rs, final SessionImplementor session) {
  // synchronized to avoid multi-thread access issues; defined as method synch to avoid
  // potential deadlock issues due to nature of code.
  if ( session.getFactory().getSettings().isWrapResultSetsEnabled() ) {
    try {
      LOG.debugf( "Wrapping result set [%s]", rs );
      return session.getFactory()
          .getJdbcServices()
          .getResultSetWrapper().wrap( rs, retreiveColumnNameToIndexCache( rs ) );
    }
    catch(SQLException e) {
      LOG.unableToWrapResultSet( e );
      return rs;
    }
  }
  else {
    return rs;
  }
}

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

private synchronized ResultSet wrapResultSetIfEnabled(final ResultSet rs, final SessionImplementor session) {
  // synchronized to avoid multi-thread access issues; defined as method synch to avoid
  // potential deadlock issues due to nature of code.
  if ( session.getFactory().getSettings().isWrapResultSetsEnabled() ) {
    try {
      LOG.debugf( "Wrapping result set [%s]", rs );
      return session.getFactory()
          .getJdbcServices()
          .getResultSetWrapper().wrap( rs, retreiveColumnNameToIndexCache( rs ) );
    }
    catch(SQLException e) {
      LOG.unableToWrapResultSet( e );
      return rs;
    }
  }
  else {
    return rs;
  }
}

相关文章

Settings类方法