org.hibernate.ScrollableResults.getInteger()方法的使用及代码示例

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

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

ScrollableResults.getInteger介绍

[英]Convenience method to read an integer.
[中]读取整数的简便方法。

代码示例

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

iter.next();
assertTrue( f1!=null && iter.get(0)==f2 );
iter.getInteger(1);
iter.next();
assertTrue( f1!=null && iter.get(0)==f2 );
iter.getInteger(1);

代码示例来源:origin: com.atlassian.hibernate/hibernate.adapter

@Override
public Integer getInteger(final int col) throws HibernateException {
  try {
    return results.getInteger(col);
  } catch (final PersistenceException ex) {
    throw HibernateExceptionAdapter.adapt(ex);
  }
}

代码示例来源:origin: stackoverflow.com

ScrollableResults result = null;
try {
  result = query.scroll();
  int totalRowsNumber = result.getInteger(0);
  int from = // calculate the index of row to get for the expected page if any

  /*
   * Reading data form page and using Transformers.ALIAS_TO_ENTITY_MAP
   * to make life easier.
   */ 
}
finally {
  if (result != null) 
    result.close()
}

相关文章