本文整理了Java中org.intermine.objectstore.query.Query.getOrderBy
方法的一些代码示例,展示了Query.getOrderBy
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getOrderBy
方法的具体详情如下:
包路径:org.intermine.objectstore.query.Query
类名称:Query
方法名:getOrderBy
[英]Gets the ORDER BY clause of this Query
[中]获取此查询的ORDER BY子句
代码示例来源:origin: org.intermine/intermine-objectstore
for (QueryOrderable qn : q.getOrderBy()) {
retval.append(needComma ? ", " : " ORDER BY ");
needComma = true;
代码示例来源:origin: org.intermine/intermine-api
queryBits.put(order.getOrderPath(), qf);
if ((!qu.getOrderBy().contains(qf)) && (!qu.getOrderBy()
.contains(new OrderDescending(qf)))) {
if (order.getDirection().equals(OrderDirection.DESC)) {
if ((!qu.getOrderBy().contains(qf)) && (!qu.getOrderBy()
.contains(new OrderDescending(qf)))) {
qu.addToOrderBy(qf);
代码示例来源:origin: intermine/intermine
public void testClearOrderBy() {
clearQuery.clearOrderBy();
assertEquals(0, clearQuery.getOrderBy().size());
}
代码示例来源:origin: intermine/intermine
queryBits.put(order.getOrderPath(), qf);
if ((!qu.getOrderBy().contains(qf)) && (!qu.getOrderBy()
.contains(new OrderDescending(qf)))) {
if (order.getDirection().equals(OrderDirection.DESC)) {
if ((!qu.getOrderBy().contains(qf)) && (!qu.getOrderBy()
.contains(new OrderDescending(qf)))) {
qu.addToOrderBy(qf);
代码示例来源:origin: intermine/intermine
for (QueryOrderable qn : q.getOrderBy()) {
retval.append(needComma ? ", " : " ORDER BY ");
needComma = true;
代码示例来源:origin: intermine/intermine
for (QueryOrderable qo : query.getOrderBy()) {
if ((qo instanceof QuerySelectable) && (!query.getSelect().contains(qo))) {
query.addToSelect((QuerySelectable) qo);
代码示例来源:origin: org.intermine/intermine-api
for (QueryOrderable qo : query.getOrderBy()) {
if ((qo instanceof QuerySelectable) && (!query.getSelect().contains(qo))) {
query.addToSelect((QuerySelectable) qo);
代码示例来源:origin: intermine/intermine
for (QueryOrderable orderElement : q.getOrderBy()) {
if (orderElement instanceof OrderDescending) {
orderElement = ((OrderDescending) orderElement).getQueryOrderable();
代码示例来源:origin: org.intermine/intermine-objectstore
for (QueryOrderable orderElement : q.getOrderBy()) {
if (orderElement instanceof OrderDescending) {
orderElement = ((OrderDescending) orderElement).getQueryOrderable();
代码示例来源:origin: intermine/intermine
timeSpentPrepare += time2 - time1;
Set<Integer> bag = collections.keySet();
if ((q.getConstraint() == null) && q.getOrderBy().isEmpty()
&& q.getGroupBy().isEmpty()) {
代码示例来源:origin: org.intermine/intermine-objectstore
newQuery.addToSelect(newSelect, aliases.get(origSelect));
for (QueryOrderable origOrder : query.getOrderBy()) {
QueryOrderable newOrder = (QueryOrderable) cloneThing(origOrder, fromElementMap,
qopeMap);
代码示例来源:origin: intermine/intermine
newQuery.addToSelect(newSelect, aliases.get(origSelect));
for (QueryOrderable origOrder : query.getOrderBy()) {
QueryOrderable newOrder = (QueryOrderable) cloneThing(origOrder, fromElementMap,
qopeMap);
代码示例来源:origin: org.intermine/intermine-objectstore
timeSpentPrepare += time2 - time1;
Set<Integer> bag = collections.keySet();
if ((q.getConstraint() == null) && q.getOrderBy().isEmpty()
&& q.getGroupBy().isEmpty()) {
代码示例来源:origin: org.intermine/intermine-integrate
if (query.getOrderBy().size() > 0 || query.getGroupBy().size() > 0) {
throw new ObjectStoreException("Query cannot be translated: " + query);
代码示例来源:origin: intermine/intermine
if (query.getOrderBy().size() > 0 || query.getGroupBy().size() > 0) {
throw new ObjectStoreException("Query cannot be translated: " + query);
代码示例来源:origin: intermine/intermine
/**
* The absence of a proper Query.equals() method means that we
* have to do various tests here. This does rely on constructing
* the query in the tests in the correct form, ie. we will not
* notice that an "OR" ConstraintSet with one SimpleConstraint in
* it is the same as a SimpleConstraint.
*/
public static void assertEquals(String msg, Query q1, Query q2) {
if ((q1 != null) && (q2 != null)) {
msg += ": expected <" + q1.toString() + "> but was <" + q2.toString() + ">";
//msg += ": q1 = " + q1.toString() + ", q2 = " + q2.toString();
// Are the SELECT lists equal?
checkQueryClassLists(msg + ": SELECT lists are not equal", q1.getSelect(), q2.getSelect(), q1, q2);
// Are the FROM lists equal?
checkQueryClassLists(msg + ": FROM lists are not equal", q1.getFrom(), q2.getFrom(), q1, q2);
// Are the constraints equal?
checkConstraints(msg + ": CONSTRAINTS not the same", q1.getConstraint(), q2.getConstraint(), q1, q2);
// Are the ORDER BY lists equal?
checkQueryClassLists(msg + ": ORDER BY lists are not equal", q1.getOrderBy(), q2.getOrderBy(), q1, q2);
Assert.assertEquals(msg + ": LIMIT is the not the same", q1.getLimit(), q2.getLimit());
// Do the toString methods return the same thing?
checkToString(msg + ": toString does not return the same String", q1, q2);
} else if ((q1 == null) && (q2 == null)) {
// They are equal - albeit null.
} else {
Assert.assertNotNull(msg + ": q1 is null, while q2 is not null", q1);
Assert.fail(msg + ": q2 is null, while q1 is not null");
}
}
内容来源于网络,如有侵权,请联系作者删除!