@@ -1419,7 +1419,7 @@ public Network doInTransaction(TransactionStatus status) throws InsufficientCapa
14191419 }
14201420
14211421 @ Override
1422- public Pair < List <? extends Network >, Integer > searchForNetworks (ListNetworksCmd cmd ) {
1422+ public List <? extends Network > searchForAllNetworks (ListNetworksCmd cmd ) {
14231423 Long id = cmd .getId ();
14241424 String keyword = cmd .getKeyword ();
14251425 Long zoneId = cmd .getZoneId ();
@@ -1514,7 +1514,7 @@ public Pair<List<? extends Network>, Integer> searchForNetworks(ListNetworksCmd
15141514 if (domainId != null ) {
15151515 path = _domainDao .findById (domainId ).getPath ();
15161516 } else {
1517- path = _domainDao .findById (caller .getDomainId ()).getPath ();
1517+ path = _domainDao .findById (caller .getDomainId ()).getPath ();
15181518 }
15191519
15201520 if (listAll && domainId == null ) {
@@ -1563,11 +1563,11 @@ public Pair<List<? extends Network>, Integer> searchForNetworks(ListNetworksCmd
15631563 sb .join ("domainSearch" , domainSearch , sb .entity ().getDomainId (), domainSearch .entity ().getId (), JoinBuilder .JoinType .INNER );
15641564 }
15651565
1566- SearchBuilder <AccountVO > accountSearch = _accountDao .createSearchBuilder ();
1566+ SearchBuilder <AccountVO > accountSearch = _accountDao .createSearchBuilder ();
15671567 accountSearch .and ("typeNEQ" , accountSearch .entity ().getType (), SearchCriteria .Op .NEQ );
15681568 accountSearch .and ("typeEQ" , accountSearch .entity ().getType (), SearchCriteria .Op .EQ );
15691569
1570- sb .join ("accountSearch" , accountSearch , sb .entity ().getAccountId (), accountSearch .entity ().getId (), JoinBuilder .JoinType .INNER );
1570+ sb .join ("accountSearch" , accountSearch , sb .entity ().getAccountId (), accountSearch .entity ().getId (), JoinBuilder .JoinType .INNER );
15711571
15721572 List <NetworkVO > networksToReturn = new ArrayList <NetworkVO >();
15731573
@@ -1638,7 +1638,11 @@ public Pair<List<? extends Network>, Integer> searchForNetworks(ListNetworksCmd
16381638
16391639 networksToReturn = networksForDeploy ;
16401640 }
1641-
1641+ return networksToReturn ;
1642+ }
1643+ @ Override
1644+ public Pair <List <? extends Network >, Integer > searchForNetworks (ListNetworksCmd cmd ) {
1645+ List <? extends Network > networksToReturn = searchForAllNetworks (cmd );
16421646 //Now apply pagination
16431647 List <? extends Network > wPagination = StringUtils .applyPagination (networksToReturn , cmd .getStartIndex (), cmd .getPageSizeVal ());
16441648 if (wPagination != null ) {
0 commit comments