aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-10-17 18:04:12 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-10-20 15:10:13 +0200
commitdf9a88908ff03d2d2aa6226615d1fe29e6f604b2 (patch)
treebc46b808254a38f9161b14d92f48cad0352652d5 /sonar-db
parent8981c0fe32abe0a5fc34f9ed74f41e8280a818ce (diff)
downloadsonarqube-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.java10
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));
}