shwstppr commented on code in PR #9840:
URL: https://github.com/apache/cloudstack/pull/9840#discussion_r1828874110


##########
engine/schema/src/main/java/com/cloud/capacity/dao/CapacityDaoImpl.java:
##########
@@ -671,6 +671,18 @@ public CapacityVO findByHostIdType(Long hostId, short 
capacityType) {
         return findOneBy(sc);
     }
 
+    @Override
+    public List<CapacityVO> listByHostIdTypes(Long hostId, List<Short> 
capacityTypes) {
+        SearchBuilder<CapacityVO> sb = createSearchBuilder();

Review Comment:
   This searchbuilder is used only by this method, would it add any benefit in 
adding it as a class object?



##########
engine/schema/src/main/java/com/cloud/dc/ClusterDetailsDaoImpl.java:
##########
@@ -82,6 +85,23 @@ public Map<String, String> findDetails(long clusterId) {
         return details;
     }
 
+    @Override
+    public Map<String, String> findDetails(long clusterId, Collection<String> 
names) {
+        if (CollectionUtils.isEmpty(names)) {
+            return new HashMap<>();
+        }
+        SearchBuilder<ClusterDetailsVO> sb = createSearchBuilder();

Review Comment:
   This searchbuilder is used only by this method, would it add any benefit in 
adding it as a class object?



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

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

Reply via email to