From: Simon Brandhof Date: Mon, 3 Oct 2016 16:31:21 +0000 (+0200) Subject: SONAR-8134 change signature of GroupDao#selectByName() X-Git-Tag: 6.2-RC1~452 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0870706bd681026b1d1c7b01f912c825c9409468;p=sonarqube.git SONAR-8134 change signature of GroupDao#selectByName() --- diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupDao.java b/sonar-db/src/main/java/org/sonar/db/user/GroupDao.java index 385ecd7a226..34ddd528c46 100644 --- a/sonar-db/src/main/java/org/sonar/db/user/GroupDao.java +++ b/sonar-db/src/main/java/org/sonar/db/user/GroupDao.java @@ -68,12 +68,12 @@ public class GroupDao implements Dao { /** * @param dbSession - * @param organizationKey non-null key of organization (no support of "default" organization) + * @param organizationUuid non-null UUID of organization (no support of "default" organization) * @param name non-null group name * @return the group with the given organization key and name */ - public Optional selectByName(DbSession dbSession, String organizationKey, String name) { - return Optional.ofNullable(mapper(dbSession).selectByName(organizationKey,name)); + public Optional selectByName(DbSession dbSession, String organizationUuid, String name) { + return Optional.ofNullable(mapper(dbSession).selectByName(organizationUuid, name)); } /** diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupMapper.java b/sonar-db/src/main/java/org/sonar/db/user/GroupMapper.java index 95536546842..b0090796def 100644 --- a/sonar-db/src/main/java/org/sonar/db/user/GroupMapper.java +++ b/sonar-db/src/main/java/org/sonar/db/user/GroupMapper.java @@ -47,5 +47,5 @@ public interface GroupMapper { void deleteById(long groupId); @CheckForNull - GroupDto selectByName(@Param("organizationKey") String organizationKey, @Param("name")String name); + GroupDto selectByName(@Param("organizationUuid") String organizationUuid, @Param("name")String name); } diff --git a/sonar-db/src/main/resources/org/sonar/db/user/GroupMapper.xml b/sonar-db/src/main/resources/org/sonar/db/user/GroupMapper.xml index 8ea087c27c7..c36161d25c5 100644 --- a/sonar-db/src/main/resources/org/sonar/db/user/GroupMapper.xml +++ b/sonar-db/src/main/resources/org/sonar/db/user/GroupMapper.xml @@ -17,17 +17,14 @@ select from groups g - inner join organizations o on o.uuid = g.organization_uuid - where o.kee = #{organizationKey} and g.name = #{name} + where g.organization_uuid = #{organizationUuid} and g.name = #{name}