diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-10-24 11:16:42 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-10-24 11:16:42 +0200 |
commit | a0cfbf2ec2c6d6313b532df054dad8feaad3442f (patch) | |
tree | c4dbf1f519eff73d1714412cbfa9fecd515cd4c5 /sonar-db/src | |
parent | 13e4562536570e5f0b2691c8aa09ae14ed4a3f0a (diff) | |
download | sonarqube-a0cfbf2ec2c6d6313b532df054dad8feaad3442f.tar.gz sonarqube-a0cfbf2ec2c6d6313b532df054dad8feaad3442f.zip |
Fix minor Quality flaws
Diffstat (limited to 'sonar-db/src')
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionMapper.java | 12 | ||||
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/permission/UserPermissionMapper.java | 15 |
2 files changed, 18 insertions, 9 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionMapper.java b/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionMapper.java index 29273b484d3..3262d8b8cad 100644 --- a/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionMapper.java +++ b/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionMapper.java @@ -28,11 +28,13 @@ import org.apache.ibatis.session.RowBounds; public interface GroupPermissionMapper { - List<String> selectGroupNamesByQuery(@Param("organizationUuid") String organizationUuid, @Param("query") PermissionQuery query, RowBounds rowBounds); + List<String> selectGroupNamesByQuery(@Param("organizationUuid") String organizationUuid, + @Param("query") PermissionQuery query, RowBounds rowBounds); int countGroupsByQuery(@Param("organizationUuid") String organizationUuid, @Param("query") PermissionQuery query); - List<GroupPermissionDto> selectByGroupIds(@Param("organizationUuid") String organizationUuid, @Param("groupIds") List<Long> groupIds, @Nullable @Param("projectId") Long projectId); + List<GroupPermissionDto> selectByGroupIds(@Param("organizationUuid") String organizationUuid, + @Param("groupIds") List<Long> groupIds, @Nullable @Param("projectId") Long projectId); void groupsCountByProjectIdAndPermission(Map<String, Object> parameters, ResultHandler resultHandler); @@ -45,9 +47,11 @@ public interface GroupPermissionMapper { int countRowsByRootComponentId(@Param("rootComponentId") long rootComponentId); - List<String> selectGlobalPermissionsOfGroup(@Param("organizationUuid") String organizationUuid, @Nullable @Param("groupId") Long groupId); + List<String> selectGlobalPermissionsOfGroup(@Param("organizationUuid") String organizationUuid, + @Nullable @Param("groupId") Long groupId); - List<String> selectProjectPermissionsOfGroup(@Param("organizationUuid") String organizationUuid, @Nullable @Param("groupId") Long groupId, @Param("projectId") long projectId); + List<String> selectProjectPermissionsOfGroup(@Param("organizationUuid") String organizationUuid, + @Nullable @Param("groupId") Long groupId, @Param("projectId") long projectId); void deleteByOrganization(@Param("organizationUuid") String organizationUuid); diff --git a/sonar-db/src/main/java/org/sonar/db/permission/UserPermissionMapper.java b/sonar-db/src/main/java/org/sonar/db/permission/UserPermissionMapper.java index 16bf5dd747e..9568e9b8d31 100644 --- a/sonar-db/src/main/java/org/sonar/db/permission/UserPermissionMapper.java +++ b/sonar-db/src/main/java/org/sonar/db/permission/UserPermissionMapper.java @@ -27,15 +27,18 @@ import org.apache.ibatis.session.RowBounds; public interface UserPermissionMapper { - List<UserPermissionDto> selectByQuery(@Param("organizationUuid") String organizationUuid, @Param("query") PermissionQuery query, @Nullable @Param("userLogins") Collection<String> userLogins, RowBounds rowBounds); + List<UserPermissionDto> selectByQuery(@Param("organizationUuid") String organizationUuid, + @Param("query") PermissionQuery query, @Nullable @Param("userLogins") Collection<String> userLogins, RowBounds rowBounds); /** * Count the number of distinct users returned by {@link #selectByQuery(String, PermissionQuery, Collection, RowBounds)} * {@link PermissionQuery#getPageOffset()} and {@link PermissionQuery#getPageSize()} are ignored. * - * @param useNull must always be null. It is needed for using the sql of {@link #selectByQuery(String, PermissionQuery, Collection, RowBounds)} + * @param useNull must always be null. It is needed for using the sql of + * {@link #selectByQuery(String, PermissionQuery, Collection, RowBounds)} */ - int countUsersByQuery(@Param("organizationUuid") String organizationUuid, @Param("query") PermissionQuery query, @Nullable @Param("userLogins") Collection<String> useNull); + int countUsersByQuery(@Param("organizationUuid") String organizationUuid, @Param("query") PermissionQuery query, + @Nullable @Param("userLogins") Collection<String> useNull); /** * Count the number of users per permission for a given list of projects. @@ -47,9 +50,11 @@ public interface UserPermissionMapper { int countRowsByRootComponentId(@Param("rootComponentId") long projectId); - void deleteGlobalPermission(@Param("userId") long userId, @Param("permission") String permission, @Param("organizationUuid") String organizationUuid); + void deleteGlobalPermission(@Param("userId") long userId, @Param("permission") String permission, + @Param("organizationUuid") String organizationUuid); - void deleteProjectPermission(@Param("userId") long userId, @Param("permission") String permission, @Param("projectId") long projectId); + void deleteProjectPermission(@Param("userId") long userId, @Param("permission") String permission, + @Param("projectId") long projectId); void deleteProjectPermissions(@Param("projectId") long projectId); |