diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-10-17 18:04:12 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-10-20 15:10:13 +0200 |
commit | df9a88908ff03d2d2aa6226615d1fe29e6f604b2 (patch) | |
tree | bc46b808254a38f9161b14d92f48cad0352652d5 /sonar-db | |
parent | 8981c0fe32abe0a5fc34f9ed74f41e8280a818ce (diff) | |
download | sonarqube-df9a88908ff03d2d2aa6226615d1fe29e6f604b2.tar.gz sonarqube-df9a88908ff03d2d2aa6226615d1fe29e6f604b2.zip |
SONAR-8134 add javadoc to GroupPermissionDao
Diffstat (limited to 'sonar-db')
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionDao.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionDao.java b/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionDao.java index 2fb928549ab..93523db16d5 100644 --- a/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionDao.java +++ b/sonar-db/src/main/java/org/sonar/db/permission/GroupPermissionDao.java @@ -51,16 +51,26 @@ public class GroupPermissionDao implements Dao { } /** + * Returns the names of the groups that match the given query, for the given organization. + * The virtual group "Anyone" may be returned as the value {@link DefaultGroups#ANYONE}. * @return group names, sorted in alphabetical order */ public List<String> selectGroupNamesByQuery(DbSession dbSession, String organizationUuid, PermissionQuery query) { return mapper(dbSession).selectGroupNamesByQuery(organizationUuid, query, new RowBounds(query.getPageOffset(), query.getPageSize())); } + /** + * Count the number of groups returned by {@link #selectGroupNamesByQuery(DbSession, String, PermissionQuery)}, + * without applying pagination. + */ public int countGroupsByQuery(DbSession dbSession, String organizationUuid, PermissionQuery query) { return mapper(dbSession).countGroupsByQuery(organizationUuid, query); } + /** + * Select global or project permission of given groups and organization. Anyone virtual group is supported + * through the value "zero" (0L) in {@code groupIds}. + */ public List<GroupPermissionDto> selectByGroupIds(DbSession dbSession, String organizationUuid, List<Long> groupIds, @Nullable Long projectId) { return executeLargeInputs(groupIds, groups -> mapper(dbSession).selectByGroupIds(organizationUuid, groups, projectId)); } |