class PublicActivityAwardConverter extends AbstractConverter<PublicActivityAward, PublicActivityAwardResource> {

	@Override
	public PublicActivityAwardResource convert(final PublicActivityAward source, final PublicActivityAwardResource target) {

		target.setId(source.getId());
		target.setAwardName(source.getAwardName());
		target.setBonus(source.getBonus());
		target.setBegDate(source.getBegDate());
		target.setEndDate(source.getEndDate());
		
		if (source.getPublicActivity() != null) {
			target.setPublicActivityId(source.getPublicActivity().getId());
		}
		
		if (source.getEnrolmentSubject() != null) {
			target.setEnrolmentSubjectId(source.getEnrolmentSubject().getId());
		}
		
		return target;
	}

}