You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/07/02 08:33:55 UTC

[GitHub] [cloudstack] ravening commented on a change in pull request #4186: Adding pagination for quotaSummary and quotaTariffList

ravening commented on a change in pull request #4186:
URL: https://github.com/apache/cloudstack/pull/4186#discussion_r448838615



##########
File path: engine/schema/src/main/java/com/cloud/user/dao/AccountDaoImpl.java
##########
@@ -157,9 +157,16 @@ public AccountDaoImpl() {
 
     @Override
     public List<AccountVO> findAccountsLike(String accountName) {
+        return findAccountsLike(accountName, null);
+    }
+
+    @Override
+    public List<AccountVO> findAccountsLike(String accountName, Filter filter) {
         SearchCriteria<AccountVO> sc = createSearchCriteria();
-        sc.addAnd("accountName", SearchCriteria.Op.LIKE, "%" + accountName + "%");
-        return listBy(sc);
+        if (accountName != null) {

Review comment:
       > Doesn't it inherently do the same thing ?
   
   It inherently does the same thing but using optionals is preferred over checking explicitly for `null`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org