class EnrolmentEnrolmentSubjectConverter extends AbstractConverter<EnrolmentEnrolmentSubject, EnrolmentEnrolmentSubjectResource> {

    @Override
    public EnrolmentEnrolmentSubjectResource convert(
	    final EnrolmentEnrolmentSubject source,
	    final EnrolmentEnrolmentSubjectResource target) {
	target.setId(source.getId());
	target.setMark(source.getMark());
	if (source.getEnrolment() != null) {
	    target.setEnrolmentId(source.getEnrolment().getId());
	}
	
	if (source.getEnrolmentSubject() != null) {
	    target.setEnrolmentSubjectId(source.getEnrolmentSubject().getId());
	}
	
	if (source.getPersonEnrolmentSubject() != null) {
	    target.setPersonEnrolmentSubjectId(source.getPersonEnrolmentSubject().getId());
	}
	return target;
    }

}