本文整理了Java中org.apache.metamodel.query.Query.orderBy
方法的一些代码示例,展示了Query.orderBy
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.orderBy
方法的具体详情如下:
包路径:org.apache.metamodel.query.Query
类名称:Query
方法名:orderBy
暂无
代码示例来源:origin: apache/metamodel
@Override
public void parse(String delim, String itemToken) {
_query.orderBy(itemToken);
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
@Override
public void parse(String delim, String itemToken) {
_query.orderBy(itemToken);
}
代码示例来源:origin: apache/metamodel
public Query orderBy(Column column) {
return orderBy(column, Direction.ASC);
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
public Query orderBy(Column column) {
return orderBy(column, Direction.ASC);
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
public Query orderBy(String... orderByTokens) {
for (String orderByToken : orderByTokens) {
orderByToken = orderByToken.trim();
final Direction direction;
if (orderByToken.toUpperCase().endsWith("DESC")) {
direction = Direction.DESC;
orderByToken = orderByToken.substring(0, orderByToken.length() - 4).trim();
} else if (orderByToken.toUpperCase().endsWith("ASC")) {
direction = Direction.ASC;
orderByToken = orderByToken.substring(0, orderByToken.length() - 3).trim();
} else {
direction = Direction.ASC;
}
OrderByItem orderByItem = new OrderByItem(findSelectItem(orderByToken, true), direction);
orderBy(orderByItem);
}
return this;
}
代码示例来源:origin: apache/metamodel
public Query orderBy(String... orderByTokens) {
for (String orderByToken : orderByTokens) {
orderByToken = orderByToken.trim();
final Direction direction;
if (orderByToken.toUpperCase().endsWith("DESC")) {
direction = Direction.DESC;
orderByToken = orderByToken.substring(0, orderByToken.length() - 4).trim();
} else if (orderByToken.toUpperCase().endsWith("ASC")) {
direction = Direction.ASC;
orderByToken = orderByToken.substring(0, orderByToken.length() - 3).trim();
} else {
direction = Direction.ASC;
}
OrderByItem orderByItem = new OrderByItem(findSelectItem(orderByToken, true), direction);
orderBy(orderByItem);
}
return this;
}
代码示例来源:origin: apache/metamodel
public Query orderBy(Column column, Direction direction) {
SelectItem selectItem = _selectClause.getSelectItem(column);
if (selectItem == null) {
selectItem = new SelectItem(column);
}
return orderBy(new OrderByItem(selectItem, direction));
}
代码示例来源:origin: org.eobjects.analyzerbeans/AnalyzerBeans-core
@Override
public Query optimizeQuery(Query q, Category category) {
if (category == Category.VALID) {
q.setMaxRows(maxRows);
if (firstRow > 1) {
q.setFirstRow(firstRow);
}
if (orderColumn != null) {
Column physicalColumn = orderColumn.getPhysicalColumn();
q.orderBy(physicalColumn);
}
} else {
throw new IllegalStateException("Can only optimize the VALID max rows category");
}
return q;
}
代码示例来源:origin: apache/metamodel
public SatisfiedOrderByBuilderImpl(FunctionType function, Column column,
Query query, GroupedQueryBuilder queryBuilder) {
super(queryBuilder);
orderByitem = new OrderByItem(new SelectItem(function, column));
query.orderBy(orderByitem);
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
public SatisfiedOrderByBuilderImpl(FunctionType function, Column column,
Query query, GroupedQueryBuilder queryBuilder) {
super(queryBuilder);
orderByitem = new OrderByItem(new SelectItem(function, column));
query.orderBy(orderByitem);
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
public Query orderBy(Column column, Direction direction) {
SelectItem selectItem = _selectClause.getSelectItem(column);
if (selectItem == null) {
selectItem = new SelectItem(column);
}
return orderBy(new OrderByItem(selectItem, direction));
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
public SatisfiedOrderByBuilderImpl(Column column, Query query,
GroupedQueryBuilder queryBuilder) {
super(queryBuilder);
orderByitem = new OrderByItem(new SelectItem(column));
query.orderBy(orderByitem);
}
代码示例来源:origin: apache/metamodel
public SatisfiedOrderByBuilderImpl(Column column, Query query,
GroupedQueryBuilder queryBuilder) {
super(queryBuilder);
orderByitem = new OrderByItem(new SelectItem(column));
query.orderBy(orderByitem);
}
代码示例来源:origin: datacleaner/DataCleaner
q.orderBy(physicalColumn);
代码示例来源:origin: apache/metamodel
@Override
public Query clone() {
final Query q = new Query();
q.setMaxRows(_maxRows);
q.setFirstRow(_firstRow);
q.getSelectClause().setDistinct(_selectClause.isDistinct());
for (FromItem item : _fromClause.getItems()) {
q.from(item.clone());
}
for (SelectItem item : _selectClause.getItems()) {
q.select(item.clone(q));
}
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;
}
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
@Override
public Query clone() {
final Query q = new Query();
q.setMaxRows(_maxRows);
q.setFirstRow(_firstRow);
q.getSelectClause().setDistinct(_selectClause.isDistinct());
for (FromItem item : _fromClause.getItems()) {
q.from(item.clone());
}
for (SelectItem item : _selectClause.getItems()) {
q.select(item.clone(q));
}
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;
}
}
内容来源于网络,如有侵权,请联系作者删除!