ListJobService.java 文件源码

java
阅读 40 收藏 0 点赞 0 评论 0

项目:osc-core 作者:
@Override
public ListResponse<JobRecordDto> exec(ListJobRequest request, EntityManager em) throws Exception {
    ListResponse<JobRecordDto> response = new ListResponse<JobRecordDto>();

    // Initializing Entity Manager
    OSCEntityManager<JobRecord> emgr = new OSCEntityManager<JobRecord>(JobRecord.class, em, this.txBroadcastUtil);
    // to do mapping

    List<JobRecordDto> dtoList = new ArrayList<JobRecordDto>();

    // mapping all the job objects to job dto objects
    for (JobRecord j : emgr.listAll(false, "id")) {
        JobRecordDto dto = new JobRecordDto();
        JobEntityManager.fromEntity(j, dto);
        dtoList.add(dto);
    }

    response.setList(dtoList);
    return response;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号