DaanHoogland commented on code in PR #11444:
URL: https://github.com/apache/cloudstack/pull/11444#discussion_r3976562796


##########
plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/dao/LdapConfigurationDaoImpl.java:
##########
@@ -63,29 +64,29 @@ public LdapConfigurationVO findByHostname(final String 
hostname) {
 
     @Override
     public LdapConfigurationVO find(String hostname, int port, Long domainId) {
-        SearchCriteria<LdapConfigurationVO> sc = getSearchCriteria(hostname, 
port, domainId, false);
+        SearchCriteria<LdapConfigurationVO> sc = getSearchCriteria(hostname, 
port, domainId, false, null, null);
         return findOneBy(sc);
     }
 
     @Override
     public LdapConfigurationVO find(String hostname, int port, Long domainId, 
boolean listAll) {
-        SearchCriteria<LdapConfigurationVO> sc = getSearchCriteria(hostname, 
port, domainId, listAll);
+        SearchCriteria<LdapConfigurationVO> sc = getSearchCriteria(hostname, 
port, domainId, listAll, null, null);
         return findOneBy(sc);
     }
 
     @Override
-    public Pair<List<LdapConfigurationVO>, Integer> searchConfigurations(final 
String hostname, final int port, final Long domainId) {
-        SearchCriteria<LdapConfigurationVO> sc = getSearchCriteria(hostname, 
port, domainId, false);
-        return searchAndCount(sc, null);
+    public Pair<List<LdapConfigurationVO>, Integer> searchConfigurations(final 
String hostname, final int port, final Long domainId, Long offset, Long limit) {
+        SearchCriteria<LdapConfigurationVO> sc = getSearchCriteria(hostname, 
port, domainId, false, offset, limit);
+        return searchAndCount(sc, new Filter(LdapConfigurationVO.class, "id", 
true, offset, limit));
     }
 
     @Override
-    public Pair<List<LdapConfigurationVO>, Integer> searchConfigurations(final 
String hostname, final int port, final Long domainId, final boolean listAll) {
-        SearchCriteria<LdapConfigurationVO> sc = getSearchCriteria(hostname, 
port, domainId, listAll);
-        return searchAndCount(sc, null);
+    public Pair<List<LdapConfigurationVO>, Integer> searchConfigurations(final 
String hostname, final int port, final Long domainId, final boolean listAll, 
Long offset, Long limit) {
+        SearchCriteria<LdapConfigurationVO> sc = getSearchCriteria(hostname, 
port, domainId, listAll, offset, limit);
+        return searchAndCount(sc, new Filter(LdapConfigurationVO.class, "id", 
true, offset, limit));
     }
 
-    private SearchCriteria<LdapConfigurationVO> getSearchCriteria(String 
hostname, int port, Long domainId,boolean listAll) {
+    private SearchCriteria<LdapConfigurationVO> getSearchCriteria(String 
hostname, int port, Long domainId,boolean listAll, Long offset, Long limit) {

Review Comment:
   these extra parameters are not used. why add them?



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