weizhouapache commented on code in PR #12994:
URL: https://github.com/apache/cloudstack/pull/12994#discussion_r3534693887


##########
engine/schema/src/main/java/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java:
##########
@@ -246,4 +248,20 @@ public String getActualValue(ResourceDetail 
resourceDetail) {
         }
         return resourceDetail.getValue();
     }
+
+    @Override
+    public List<R> listDetailsForResourceIdsAndKey(List<Long> resourceIds, 
String key) {
+        if (CollectionUtils.isEmpty(resourceIds) || StringUtils.isBlank(key)) {
+            return Collections.emptyList();
+        }
+        SearchBuilder<R> sb = createSearchBuilder();
+        sb.and("name", sb.entity().getName(), Op.EQ);
+        sb.and("resourceIdIn", sb.entity().getResourceId(), Op.IN);
+        sb.done();

Review Comment:
   can define a class-level variable for this, so it will be initialized only 
once



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to