incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: Enable default sorting for listVirtualMachines and listRouters to keep back compatible.
Date Mon, 07 Jan 2013 18:26:55 GMT
Updated Branches:
  refs/heads/api_refactoring 3c1ccdf60 -> 13de3ca25


Enable default sorting for listVirtualMachines and listRouters to keep
back compatible.

Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/13de3ca2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/13de3ca2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/13de3ca2

Branch: refs/heads/api_refactoring
Commit: 13de3ca25364bfe0cc18785ac47ec7b2ad6deb0a
Parents: 3c1ccdf
Author: Min Chen <min.chen@citrix.com>
Authored: Mon Jan 7 10:26:33 2013 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Mon Jan 7 10:26:33 2013 -0800

----------------------------------------------------------------------
 .../src/com/cloud/api/query/QueryManagerImpl.java  |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/13de3ca2/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 12aaf16..ceec932 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -592,9 +592,8 @@ public class QueryManagerImpl implements QueryService, Manager {
         Boolean isRecursive = domainIdRecursiveListProject.second();
         ListProjectResourcesCriteria listProjectResourcesCriteria = domainIdRecursiveListProject.third();
 
-        // removing order by, orderBy shouold be specified in ListVMsCmd parameters
-        //Criteria c = new Criteria("id", Boolean.TRUE, cmd.getStartIndex(), cmd.getPageSizeVal());
-        Criteria c = new Criteria(null, Boolean.FALSE, cmd.getStartIndex(), cmd.getPageSizeVal());
+        Criteria c = new Criteria("id", Boolean.TRUE, cmd.getStartIndex(), cmd.getPageSizeVal());
+        //Criteria c = new Criteria(null, Boolean.FALSE, cmd.getStartIndex(), cmd.getPageSizeVal());
//version without default sorting
         c.addCriteria(Criteria.KEYWORD, cmd.getKeyword());
         c.addCriteria(Criteria.ID, cmd.getId());
         c.addCriteria(Criteria.NAME, cmd.getInstanceName());
@@ -962,10 +961,8 @@ public class QueryManagerImpl implements QueryService, Manager {
         Long domainId = domainIdRecursiveListProject.first();
         Boolean isRecursive = domainIdRecursiveListProject.second();
         ListProjectResourcesCriteria listProjectResourcesCriteria = domainIdRecursiveListProject.third();
-        // no default orderBy
-        // Filter searchFilter = new Filter(DomainRouterJoinVO.class, "id",
-        // true, cmd.getStartIndex(), cmd.getPageSizeVal());
-        Filter searchFilter = new Filter(DomainRouterJoinVO.class, null, true, cmd.getStartIndex(),
cmd.getPageSizeVal());
+        Filter searchFilter = new Filter(DomainRouterJoinVO.class, "id", true, cmd.getStartIndex(),
cmd.getPageSizeVal());
+        //Filter searchFilter = new Filter(DomainRouterJoinVO.class, null, true, cmd.getStartIndex(),
cmd.getPageSizeVal());
         SearchBuilder<DomainRouterJoinVO> sb = _routerJoinDao.createSearchBuilder();
         sb.select(null, Func.DISTINCT, sb.entity().getId()); // select distinct
                                                              // ids to get


Mime
View raw message