Package org.sonar.api.utils

Examples of org.sonar.api.utils.Paging


  private GroupWithPermissionQueryResult toGroupQueryResult(List<GroupWithPermissionDto> dtos, PermissionQuery query) {
    addAnyoneGroup(dtos, query);
    List<GroupWithPermissionDto> filteredDtos = filterMembership(dtos, query);

    Paging paging = Paging.create(query.pageSize(), query.pageIndex(), filteredDtos.size());
    List<GroupWithPermission> pagedGroups = pagedGroups(filteredDtos, paging);
    return new GroupWithPermissionQueryResult(pagedGroups, paging.hasNextPage());
  }
View Full Code Here


    // Apply pagination if needed
    if (ComponentQuery.NO_PAGINATION == query.pageSize()) {
      return new DefaultComponentQueryResult(sortedComponents).setQuery(query);
    } else {
      Paging paging = Paging.create(query.pageSize(), query.pageIndex(), foundComponents.size());
      Collection<? extends Component> pagedComponents = pagedComponents(sortedComponents, paging);
      return new DefaultComponentQueryResult(pagedComponents).setPaging(paging).setQuery(query);
    }
  }
View Full Code Here

TOP

Related Classes of org.sonar.api.utils.Paging

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.