class EnrolmentBenefitConverter extends AbstractConverter<EnrolmentBenefit, EnrolmentBenefitResource> {

	@Override
	public EnrolmentBenefitResource convert(final EnrolmentBenefit source, final EnrolmentBenefitResource target) {

		target.setId(source.getId());
		
		if (source.getEnrolment() != null) {
			target.setEnrolmentId(source.getEnrolment().getId());
		}
		
		if (source.getBenefit() != null) {
			target.setBenefitId(source.getBenefit().getId());
		}
		
		if (source.getPersonPaper() != null) {
			target.setPersonPaperId(source.getPersonPaper().getId());
		}
		
		return target;
	}

}