本文整理了Java中com.google.gdata.client.Query.setMaxResults
方法的一些代码示例,展示了Query.setMaxResults
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setMaxResults
方法的具体详情如下:
包路径:com.google.gdata.client.Query
类名称:Query
方法名:setMaxResults
[英]Sets the maximum number of results to return for the query. Note: a GData server may choose to provide fewer results, but will never provide more than the requested maximum.
[中]设置查询返回的最大结果数。注意:GData服务器可能会选择提供较少的结果,但提供的结果永远不会超过请求的最大值。
代码示例来源:origin: wso2-attic/esb-connectors
contactQuery.setMaxResults(Integer.parseInt(maxResults));
代码示例来源: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.setMaxResults(Integer.parseInt(maxResults));
内容来源于网络,如有侵权,请联系作者删除!