class ProblemTransformer {

    ProblemDTO toDto(Problem problem) {
        ProblemDTO result = new ProblemDTO();
        result.setId(0L);
        if (null != problem) {
            result.setId(problem.getId());
            result.setName(problem.getName());
            result.setComment(problem.getComment());
            result.setStatus(problem.getStatus());
            result.setEffectiveStatus(problem.getEffectiveStatus());
            result.setBlamedTeam(teamTransformer.toDto(problem.getBlamedTeam()));
            result.setDefectId(problem.getDefectId());
            result.setDefectExistence(problem.getDefectExistence());
            result.setClosingDateTime(problem.getClosingDateTime());
            result.setRootCause(rootCauseTransformer.toDto(problem.getRootCause()));
            result.setCreationDateTime(problem.getCreationDateTime());
            result.setFirstSeenDateTime(problem.getFirstSeenDateTime());
            result.setLastSeenDateTime(problem.getLastSeenDateTime());
        }
        return result;
    }

}