本文整理了Java中org.intermine.objectstore.query.Query.setLimit
方法的一些代码示例,展示了Query.setLimit
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setLimit
方法的具体详情如下:
包路径:org.intermine.objectstore.query.Query
类名称:Query
方法名:setLimit
[英]Sets the LIMIT parameter for this query - note that this is only honoured in a subquery.
[中]设置此查询的限制参数-请注意,这仅在子查询中有效。
代码示例来源:origin: intermine/intermine
testQuery.addToSelect(new QueryField(q, qs));
testQuery.setDistinct(true);
q.setLimit(SUMMARY_SIZE * 10);
List<ResultsRow<Object>> results = os.execute(testQuery, 0, SUMMARY_SIZE, false,
false, ObjectStore.SEQUENCE_IGNORE);
if (results.size() < SUMMARY_SIZE) {
q = QueryCloner.cloneQuery(q);
q.setLimit(Integer.MAX_VALUE);
q.setDistinct(true);
results = os.execute(q, 0, SUMMARY_SIZE, false, false,
代码示例来源:origin: org.intermine/intermine-integrate
testQuery.addToSelect(new QueryField(q, qs));
testQuery.setDistinct(true);
q.setLimit(SUMMARY_SIZE * 10);
List<ResultsRow<Object>> results = os.execute(testQuery, 0, SUMMARY_SIZE, false,
false, ObjectStore.SEQUENCE_IGNORE);
if (results.size() < SUMMARY_SIZE) {
q = QueryCloner.cloneQuery(q);
q.setLimit(Integer.MAX_VALUE);
q.setDistinct(true);
results = os.execute(q, 0, SUMMARY_SIZE, false, false,
代码示例来源:origin: intermine/intermine
sq.setDistinct(false);
processIqlStatementAST(subquery, sq, modelPackage, iterator);
sq.setLimit(limit);
if (tableAlias == null) {
throw new IllegalArgumentException("No alias for subquery");
代码示例来源:origin: org.intermine/intermine-objectstore
sq.setDistinct(false);
processIqlStatementAST(subquery, sq, modelPackage, iterator);
sq.setLimit(limit);
if (tableAlias == null) {
throw new IllegalArgumentException("No alias for subquery");
代码示例来源:origin: org.intermine/intermine-objectstore
qopeMap));
newQuery.setDistinct(query.isDistinct());
newQuery.setLimit(query.getLimit());
} catch (NoSuchFieldException e) {
throw new IllegalArgumentException("No such field: " + e.getMessage());
代码示例来源:origin: intermine/intermine
qopeMap));
newQuery.setDistinct(query.isDistinct());
newQuery.setLimit(query.getLimit());
} catch (NoSuchFieldException e) {
throw new IllegalArgumentException("No such field: " + e.getMessage());
代码示例来源:origin: intermine/intermine
public static Query limitedSubquery() throws Exception {
Query subQ = new Query();
QueryClass qc = new QueryClass(Employee.class);
subQ.addFrom(qc);
QueryField qf = new QueryField(qc, "name");
subQ.addToSelect(qf);
subQ.setDistinct(false);
subQ.setLimit(3);
Query q = new Query();
q.addFrom(subQ);
q.addToSelect(new QueryField(subQ, qf));
q.setDistinct(true);
return q;
}
代码示例来源:origin: intermine/intermine
public static Query limitedSubquery() throws Exception {
Query subQ = new Query();
QueryClass qc = new QueryClass(Employee.class);
subQ.addFrom(qc);
QueryField qf = new QueryField(qc, "name");
subQ.addToSelect(qf);
subQ.setDistinct(false);
subQ.setLimit(3);
Query q = new Query();
q.addFrom(subQ);
q.addToSelect(new QueryField(subQ, qf));
q.setDistinct(true);
return q;
}
内容来源于网络,如有侵权,请联系作者删除!