Search in sources :

Example 1 with ApplicationProjectDTO

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;
}
Also used : ApplicationProjectDTO(org.c4sg.dto.ApplicationProjectDTO) ArrayList(java.util.ArrayList) Application(org.c4sg.entity.Application)

Aggregations

ArrayList (java.util.ArrayList)1 ApplicationProjectDTO (org.c4sg.dto.ApplicationProjectDTO)1 Application (org.c4sg.entity.Application)1