class EnrolmentStatusConverter extends AbstractConverter<EnrolmentStatus, EnrolmentStatusResource> {

	@Override
	public EnrolmentStatusResource convert(final EnrolmentStatus source, final EnrolmentStatusResource target) {
		
		target.setId(source.getId());
		target.setIsState(source.getIsState());
		target.setIsContract(source.getIsContract());
		
		if (source.getEnrolment() != null) {
			target.setEnrolmentId(source.getEnrolment().getId());
		}
		
		if (source.getSpecOfferWave() != null) {
			target.setSpecOfferWaveId(source.getSpecOfferWave().getId());
		}
		
		if (source.getEnrolmentStatusType() != null) {
			target.setEnrolmentStatusTypeId(source.getEnrolmentStatusType().getId());
		}
		
		return target;
	}

}