SnapshotService.java 617 B

1234567891011121314151617181920
  1. package com.izouma.nineth.service;
  2. import com.izouma.nineth.domain.Snapshot;
  3. import com.izouma.nineth.dto.PageQuery;
  4. import com.izouma.nineth.repo.SnapshotRepo;
  5. import com.izouma.nineth.utils.JpaUtils;
  6. import lombok.AllArgsConstructor;
  7. import org.springframework.data.domain.Page;
  8. import org.springframework.stereotype.Service;
  9. @Service
  10. @AllArgsConstructor
  11. public class SnapshotService {
  12. private SnapshotRepo snapshotRepo;
  13. public Page<Snapshot> all(PageQuery pageQuery) {
  14. return snapshotRepo.findAll(JpaUtils.toSpecification(pageQuery, Snapshot.class), JpaUtils.toPageRequest(pageQuery));
  15. }
  16. }