Package org.springframework.hateoas.PagedResources

Examples of org.springframework.hateoas.PagedResources.PageMetadata


          restartableJobs, deployedJobs, jobDefinitionNames);
      resources.add(jobExecutionInfoResource);
    }

    final PagedResources<JobExecutionInfoResource> pagedResources = new PagedResources<JobExecutionInfoResource>(resources,
        new PageMetadata(pageable.getPageSize(), pageable.getPageNumber(),
            Long.valueOf(jobService.countJobExecutions())));
    return pagedResources;
  }
View Full Code Here


    List<PersonResource> resources = assembler.toResources(people);
    long size = 5;
    long number = 1;
    long totalElements = resources.size();
    long totalPages = totalElements / size;
    PageMetadata pageMetadata = new PageMetadata(size, number, totalElements, totalPages);
    PagedResources<PersonResource> pagedResources = new PagedResources<PersonResource>(resources, pageMetadata);
    return new HttpEntity<PagedResources<PersonResource>>(pagedResources);
  }
View Full Code Here

TOP

Related Classes of org.springframework.hateoas.PagedResources.PageMetadata

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.