本文整理了Java中dk.eobjects.metamodel.query.Query.setMaxRows
方法的一些代码示例,展示了Query.setMaxRows
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setMaxRows
方法的具体详情如下:
包路径:dk.eobjects.metamodel.query.Query
类名称:Query
方法名:setMaxRows
[英]Sets the maximum number of rows to be queried. If the result of the query yields more rows they should be discarded.
[中]
代码示例来源:origin: dk.eobjects.metamodel/MetaModel-querypostprocessor
@Override
public DataSet materializeMainSchemaTable(Table table,
Column[] columns, int maxRows) {
DataContext dc = getDataContext(table);
Query q = new Query().select(columns).from(table);
if (maxRows >= 0) {
q.setMaxRows(maxRows);
}
return dc.executeQuery(q);
}
代码示例来源:origin: dk.eobjects.commons/MetaModel
@Override
public Query clone() {
Query q = new Query();
q.setMaxRows(_maxRows);
q.getSelectClause().setDistinct(_selectClause.isDistinct());
for (FromItem item : _fromClause.getItems()) {
q.from(item.clone());
}
for (SelectItem item : _selectClause.getItems()) {
q.select(item.clone());
}
for (FilterItem item : _whereClause.getItems()) {
q.where(item.clone());
}
for (GroupByItem item : _groupByClause.getItems()) {
q.groupBy(item.clone());
}
for (FilterItem item : _havingClause.getItems()) {
q.having(item.clone());
}
for (OrderByItem item : _orderByClause.getItems()) {
q.orderBy(item.clone());
}
return q;
}
}
内容来源于网络,如有侵权,请联系作者删除!