use of com.odysseusinc.arachne.portal.api.v1.dto.SubmissionStatusDTO in project ArachneCentralAPI by OHDSI.
the class SubmissionStatusHistoryToSubmissionStatusHistoryDTOConverter method convert.
@Override
public SubmissionStatusHistoryElementDTO convert(SubmissionStatusHistoryElement source) {
Date date = source.getDate();
SubmissionStatus status = source.getStatus();
SubmissionStatusDTO submissionStatusDTO = null;
if (status != null) {
submissionStatusDTO = new SubmissionStatusDTO(status);
}
IUser author = source.getAuthor();
ShortUserDTO shortUser = null;
if (author != null) {
shortUser = conversionService.convert(author, ShortUserDTO.class);
}
return new SubmissionStatusHistoryElementDTO(date, submissionStatusDTO, shortUser, source.getComment());
}
Aggregations