本文整理了Java中com.liferay.portal.kernel.dao.orm.Query.scroll
方法的一些代码示例,展示了Query.scroll
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.scroll
方法的具体详情如下:
包路径:com.liferay.portal.kernel.dao.orm.Query
类名称:Query
方法名:scroll
暂无
代码示例来源:origin: com.liferay.portal/com.liferay.portal.kernel
ScrollableResults sr = query.scroll();
代码示例来源:origin: com.liferay.portal/com.liferay.portal.kernel
ScrollableResults sr = query.scroll();
代码示例来源:origin: com.liferay.portal/portal-kernel
public static List<?> randomList(
Query query, Dialect dialect, int total, int num,
boolean unmodifiable) {
if ((total == 0) || (num == 0)) {
return new ArrayList<Object>();
}
if (num >= total) {
return list(query, dialect, ALL_POS, ALL_POS, true);
}
int[] scrollIds = Randomizer.getInstance().nextInt(total, num);
List<Object> list = new ArrayList<Object>();
ScrollableResults sr = query.scroll();
for (int i = 0; i < scrollIds.length; i++) {
if (sr.scroll(scrollIds[i])) {
Object obj = sr.get(0);
list.add(obj);
sr.first();
}
}
if (unmodifiable) {
return new UnmodifiableList(list);
}
else {
return list;
}
}
代码示例来源:origin: com.liferay.portal/portal-kernel
List<Object> list = new ArrayList<Object>();
ScrollableResults sr = query.scroll();
代码示例来源:origin: com.liferay.portal/portal-kernel
ScrollableResults sr = query.scroll();
内容来源于网络,如有侵权,请联系作者删除!