use of org.sonar.api.utils.Paging in project sonarqube by SonarSource.
the class QgateProjectFinder method find.
public Association find(ProjectQgateAssociationQuery query) {
try (DbSession dbSession = dbClient.openSession(false)) {
getQualityGateId(dbSession, query.gateId());
List<ProjectQgateAssociationDto> projects = associationDao.selectProjects(dbSession, query);
List<ProjectQgateAssociationDto> authorizedProjects = keepAuthorizedProjects(dbSession, projects);
Paging paging = forPageIndex(query.pageIndex()).withPageSize(query.pageSize()).andTotal(authorizedProjects.size());
return new Association(toProjectAssociations(getPaginatedProjects(authorizedProjects, paging)), paging.hasNextPage());
}
}
Aggregations