use of org.c4sg.dto.ApplicationProjectDTO in project c4sg-services by Code4SocialGood.
the class ApplicationMapper method getApplicationProjectDtosFromEntities.
public List<ApplicationProjectDTO> getApplicationProjectDtosFromEntities(List<Application> applications) {
List<ApplicationProjectDTO> applicationList = new ArrayList<ApplicationProjectDTO>();
ApplicationProjectDTO applicationProject;
for (Application application : applications) {
applicationProject = new ApplicationProjectDTO();
applicationProject.setUserId(application.getUser().getId());
applicationProject.setProjectId(application.getProject().getId());
applicationProject.setProjectName(application.getProject().getName());
applicationProject.setApplicationStatus(application.getStatus());
applicationProject.setComment(application.getComment());
applicationProject.setResumeFlag(stringToBooleanConverter.convert(application.getResumeFlag()));
applicationProject.setAppliedTime(application.getAppliedTime());
applicationProject.setAcceptedTime(application.getAcceptedTime());
applicationProject.setDeclinedTime(application.getDeclinedTime());
applicationList.add(applicationProject);
}
return applicationList;
}
Aggregations