本文整理了Java中com.google.gdata.client.Query.setStartIndex
方法的一些代码示例,展示了Query.setStartIndex
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setStartIndex
方法的具体详情如下:
包路径:com.google.gdata.client.Query
类名称:Query
方法名:setStartIndex
[英]Sets the start index for query results. This is a 1-based index.
[中]设置查询结果的开始索引。这是一个基于1的索引。
代码示例来源:origin: wso2-attic/esb-connectors
contactQuery.setStartIndex(Integer.parseInt(startIndex));
代码示例来源:origin: sih4sing5hong5/google-sites-liberation
/**
* Returns an iterator containing the valid entries with indices between
* {@code start} and {@code start}+{@code num}-1 and the number of entries
* the iterator contains.
*/
private Pair<Iterator<BaseContentEntry<?>>, Integer>
getEntries(int start, int num) {
Query query = new ContentQuery(feedUrl);
try {
int numReturned = 0;
Iterator<BaseContentEntry<?>> itr = Iterators.emptyIterator();
List<BaseContentEntry<?>> entries;
do {
query.setStartIndex(start + numReturned);
query.setMaxResults(num - numReturned);
entries = entryProvider.getEntries(query, sitesService);
numReturned += entries.size();
itr = Iterators.concat(itr, entries.iterator());
} while (numReturned < num && entries.size() > 0);
return Pair.of(itr, numReturned);
} catch (IOException e) {
return catchException(e, start, num);
} catch (ServiceException e) {
return catchException(e, start, num);
}
}
代码示例来源:origin: wso2-attic/esb-connectors
contactQuery.setStartIndex(Integer.parseInt(startIndex));
内容来源于网络,如有侵权,请联系作者删除!