use of org.c4sg.entity.Application in project c4sg-services by Code4SocialGood.
the class ApplicationMapper method getApplicantDtosFromEntities.
public List<ApplicantDTO> getApplicantDtosFromEntities(List<Application> applications) {
List<ApplicantDTO> applicantList = new ArrayList<ApplicantDTO>();
ApplicantDTO applicant;
for (Application application : applications) {
applicant = new ApplicantDTO();
applicant.setUserId(application.getUser().getId());
applicant.setProjectId(application.getProject().getId());
applicant.setFirstName(application.getUser().getFirstName());
applicant.setLastName(application.getUser().getLastName());
applicant.setTitle(application.getUser().getTitle());
applicant.setApplicationStatus(application.getStatus());
applicant.setComment(application.getComment());
applicant.setResumeFlag(stringToBooleanConverter.convert(application.getResumeFlag()));
applicant.setAppliedTime(application.getAppliedTime());
applicant.setAcceptedTime(application.getAcceptedTime());
applicant.setDeclinedTime(application.getDeclinedTime());
applicantList.add(applicant);
}
return applicantList;
}
use of org.c4sg.entity.Application in project c4sg-services by Code4SocialGood.
the class ApplicationMapper method getProjectDtosFromApplicationEntities.
public List<ProjectDTO> getProjectDtosFromApplicationEntities(List<Application> applications) {
List<ProjectDTO> projectList = new ArrayList<ProjectDTO>();
Iterator<Application> applicationIter = applications.iterator();
while (applicationIter.hasNext()) {
Application application = applicationIter.next();
projectList.add(getProjectDtoFromEntity(application));
}
return projectList;
}
Aggregations