From df9a88908ff03d2d2aa6226615d1fe29e6f604b2 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 17 Oct 2016 18:04:12 +0200 Subject: [PATCH] SONAR-8134 add javadoc to GroupPermissionDao --- .../org/sonar/db/permission/GroupPermissionDao.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 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 selectByGroupIds(DbSession dbSession, String organizationUuid, List groupIds, @Nullable Long projectId) { return executeLargeInputs(groupIds, groups -> mapper(dbSession).selectByGroupIds(organizationUuid, groups, projectId)); } -- 2.39.5