Spring boot use jpa sql and pageable
<p>I am a freshman with java.I wanna select data from database and use Pageable.And I must use hql in jpa.<br/>
The codes in RestController.java:</p>

<pre><code>@RestController
@RequestMapping("/api")
public class ReportController {

    private static final Logger logger = LoggerFactory.getLogger(ReportController.class);
    private static Validator validator;

    @Autowired
    private ReportService reportService;

    @InitBinder
    protected void initBinder(WebDataBinder binder) {
        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
        validator = factory.getValidator();
    }

@RequestMapping(value = "/reports", method = RequestMethod.POST, produces = MediaTypes.JSON_UTF_8)
    public JSONObject getReports(@RequestBody ReportQueryRequest reportQueryRequest){
        logger.info("[Monitor List] partial / Params: {}", reportQueryRequest);
        Set&lt;ConstraintViolation&lt;ReportQueryRequest&gt;&gt; errors = validator.validate(reportQueryRequest);
        String name = reportQueryRequest.getReportName();
        int status = reportQueryRequest.getReportStatus();
        String createTime = reportQueryRequest.getCreateTime();
        int statusArray[];
        if (status == 3) {
            statusArray = new int[2];
            statusArray[0] = 0;
            statusArray[1] = 1;
        }else {
            statusArray = new int[1];
            statusArray[0] = status;
        }
        if (name == null){
            name = "";
        }
        if (createTime == null || !createTime.contains(",")){
            return ResponseWrapper.buildResponse(RTCodeEnum.C_PARAM_ERROR, "createTime error");
        }
        createTime = createTime.replace(" ", "");
        String[] createTimeArray = createTime.split(",");
        long startTime = Long.valueOf(createTimeArray[0]);
        long endTime = Long.valueOf(createTimeArray[1]);
        List&lt;Report&gt; reportList = reportService.getReportList(startTime, endTime, name, statusArray);
        return ResponseWrapper.buildResponse(RTCodeEnum.C_OK, reportList);
    }
}
</code></pre>

<p>The codes in Service.java:</p>

<pre><code>@Service
public class ReportService extends CrudService&lt;Report, ReportRepository&gt; {
    @Override
    @Autowired
    public void setRepo(ReportRepository repo) {
        this.repo = repo;
    }

    @Override
    public Report copy(Report from, Report to) {
        to = from;
        return to;
    }

    @Autowired
    private ReportRepository reportRepository;

    public List&lt;Report&gt; getReportList(long startTime, long endTime, String name, int[] status) {
        return reportRepository.findByCondition(startTime, endTime, name, status);
    }
}
</code></pre>

<p>The codes in Repository.java:</p>

<pre><code>@Repository
public interface ReportRepository extends CrudRepository&lt;Report,Long&gt;{
    @Query(value = "select r from Report r where r.createTime &gt;= :startTime and r.createTime &lt;= :endTime and r.name like %:name% and r.status in :status order by r.updateTime DESC")
    List&lt;Report&gt; findByCondition(
            @Param("startTime") long startTime,
            @Param("endTime") long endTime,
            @Param("name") String name,
            @Param("status") int[] status
    );
}
</code></pre>

<p>My program run successfully. Now, I wanna use <code>Pageable</code> but I don't know how to page on the data return from the method named <code>findByCondition</code> .</p>