davidjumani commented on a change in pull request #4374:
URL: https://github.com/apache/cloudstack/pull/4374#discussion_r500060364



##########
File path: framework/db/src/main/java/com/cloud/utils/db/GenericDaoBase.java
##########
@@ -1935,6 +1918,23 @@ public boolean configure(final String name, final 
Map<String, Object> params) th
         return builder.create();
     }
 
+    private SearchCriteria<T> checkAndSetRemovedIsNull(SearchCriteria<T> sc) {
+        if (_removed != null) {
+            if (sc == null) {
+                sc = createSearchCriteria();
+            }
+            sc.addAnd(_removed.second().field.getName(), 
SearchCriteria.Op.NULL);
+        }
+        return sc;
+    }
+
+    public Integer getDistinctCount(SearchCriteria<T> sc, boolean removed) {
+        if (!removed) {

Review comment:
       As of now `getDistinctCount` returns including removed so changing it 
would require changing where it's been referenced, would it be better to create 
`getDistinctCountExcludingRemoved`  ?
   Edit : Nevermind. Isn't used much elsewhere. Will make the changes




----------------------------------------------------------------
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:
[email protected]


Reply via email to