DaanHoogland commented on a change in pull request #6032:
URL: https://github.com/apache/cloudstack/pull/6032#discussion_r812626720
##########
File path:
engine/schema/src/main/java/org/apache/cloudstack/acl/dao/ProjectRoleDaoImpl.java
##########
@@ -17,45 +17,56 @@
package org.apache.cloudstack.acl.dao;
-import java.util.List;
-
-import org.apache.cloudstack.acl.ProjectRoleVO;
-
import com.cloud.utils.db.GenericDaoBase;
import com.cloud.utils.db.SearchBuilder;
import com.cloud.utils.db.SearchCriteria;
+import org.apache.cloudstack.acl.ProjectRoleVO;
import org.apache.commons.lang3.StringUtils;
+import java.util.List;
+
public class ProjectRoleDaoImpl extends GenericDaoBase<ProjectRoleVO, Long>
implements ProjectRoleDao{
private final SearchBuilder<ProjectRoleVO> ProjectRoleSearch;
public ProjectRoleDaoImpl() {
super();
ProjectRoleSearch = createSearchBuilder();
- ProjectRoleSearch.and("name", ProjectRoleSearch.entity().getName(),
SearchCriteria.Op.LIKE);
+ ProjectRoleSearch.and("name", ProjectRoleSearch.entity().getName(),
SearchCriteria.Op.EQ);
ProjectRoleSearch.and("project_id",
ProjectRoleSearch.entity().getProjectId(), SearchCriteria.Op.EQ);
+ ProjectRoleSearch.and("keyword", ProjectRoleSearch.entity().getName(),
SearchCriteria.Op.LIKE);
ProjectRoleSearch.done();
}
@Override
- public List<ProjectRoleVO> findByName(String name, Long projectId) {
+ public List<ProjectRoleVO> findByName(String name, Long projectId, String
keyword) {
Review comment:
this looks to accept both name and keyword and search for name adhering
to both. Is that intended?
--
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]