cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [3/5] git commit: refs/heads/ui-list-view-multiple-actions - CLOUDSTACK-1465: We should pass array instead of a List for SearchCriteria.Op.IN as value.
Date Tue, 05 Mar 2013 23:35:08 GMT
CLOUDSTACK-1465: We should pass array instead of a List for SearchCriteria.Op.IN as value.


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

Branch: refs/heads/ui-list-view-multiple-actions
Commit: 33757377c0a56d0e4303401c7b10ecf8d9424832
Parents: 7dbea68
Author: Min Chen <min.chen@citrix.com>
Authored: Tue Mar 5 13:46:06 2013 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Tue Mar 5 14:20:55 2013 -0800

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


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/33757377/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 746e8cb..8d8663a 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -1996,7 +1996,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
         }
 
         if (domainIds != null ){
-            sc.setParameters("domainIdIn", domainIds);
+            sc.setParameters("domainIdIn", domainIds.toArray());
         }
 
         if (includePublicOfferings){
@@ -2102,7 +2102,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
                 domainRecord = _domainDao.findById(domainRecord.getParent());
                 domainIds.add(domainRecord.getId());
             }
-            sc.addAnd("domainId", SearchCriteria.Op.IN, domainIds);
+            sc.addAnd("domainId", SearchCriteria.Op.IN, domainIds.toArray());
 
             // include also public offering if no keyword, name and id specified
             if ( keyword == null && name == null && id == null ){
@@ -2235,7 +2235,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
                 }
                 // domainId == null (public zones) or domainId IN [all domain id up to root
domain]
                 SearchCriteria<DataCenterJoinVO> sdc = _dcJoinDao.createSearchCriteria();
-                sdc.addOr("domainId", SearchCriteria.Op.IN, domainIds);
+                sdc.addOr("domainId", SearchCriteria.Op.IN, domainIds.toArray());
                 sdc.addOr("domainId", SearchCriteria.Op.NULL);
                 sc.addAnd("domain", SearchCriteria.Op.SC, sdc);
 
@@ -2265,7 +2265,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
 
                 // domainId == null (public zones) or domainId IN [all domain id up to root
domain]
                 SearchCriteria<DataCenterJoinVO> sdc = _dcJoinDao.createSearchCriteria();
-                sdc.addOr("domainId", SearchCriteria.Op.IN, domainIds);
+                sdc.addOr("domainId", SearchCriteria.Op.IN, domainIds.toArray());
                 sdc.addOr("domainId", SearchCriteria.Op.NULL);
                 sc.addAnd("domain", SearchCriteria.Op.SC, sdc);
 
@@ -2286,7 +2286,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
                         return new Pair<List<DataCenterJoinVO>, Integer>(new
ArrayList<DataCenterJoinVO>(), 0);
                     }
                     else{
-                        sc.addAnd("idIn", SearchCriteria.Op.IN, dcIds);
+                        sc.addAnd("idIn", SearchCriteria.Op.IN, dcIds.toArray());
                     }
 
                 }


Mime
View raw message