本文整理了Java中org.hibernate.ScrollableResults.afterLast()
方法的一些代码示例,展示了ScrollableResults.afterLast()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ScrollableResults.afterLast()
方法的具体详情如下:
包路径:org.hibernate.ScrollableResults
类名称:ScrollableResults
方法名:afterLast
[英]Go to a location just after the last result.
[中]在最后一个结果刚刚出来的地方。
代码示例来源:origin: hibernate/hibernate-orm
@Test
@SkipForDialect(value = CUBRIDDialect.class, comment = "As of verion 8.4.1 CUBRID doesn't support temporary tables. This test fails with"
+ "HibernateException: cannot doAfterTransactionCompletion multi-table deletes using dialect not supporting temp tables")
@SkipForDialect(value = AbstractHANADialect.class, comment = "HANA only supports forward-only cursors.")
public void testScrollingJoinFetchesReverse() {
TestData data = new TestData();
data.prepare();
Session s = openSession();
Transaction txn = s.beginTransaction();
ScrollableResults results = s
.createQuery(
"from Animal a left join fetch a.offspring where a.description like :desc order by a.id" )
.setString( "desc", "root%" ).scroll();
results.afterLast();
int counter = 0;
while ( results.previous() ) {
counter++;
Animal animal = ( Animal ) results.get( 0 );
checkResult( animal );
}
assertEquals( "unexpected result count", 2, counter );
txn.commit();
s.close();
data.cleanup();
}
代码示例来源:origin: hibernate/hibernate-orm
assertFalse( results.next() );
results.afterLast();
assertFalse( results.isFirst() );
assertFalse( results.isLast() );
代码示例来源:origin: hibernate/hibernate-orm
assertFalse( results.next() );
results.afterLast();
assertFalse( results.isFirst() );
assertFalse( results.isLast() );
代码示例来源:origin: com.atlassian.hibernate/hibernate.adapter
@Override
public void afterLast() throws HibernateException {
try {
results.afterLast();
} catch (final PersistenceException ex) {
throw HibernateExceptionAdapter.adapt(ex);
}
}
代码示例来源:origin: hibernate/hibernate-search
assertTrue( "beforeFirst() pointer incorrect", results.isFirst() );
results.afterLast();
results.previous();
assertTrue( "afterLast() pointer incorrect", results.isLast() );
内容来源于网络,如有侵权,请联系作者删除!