class DegreeConverter extends AbstractConverter<Degree, DegreeResource> {

	@Override
	public DegreeResource convert(final Degree source, final DegreeResource target) {

		target.setId(source.getId());
		
		if (source.getPerson() != null) {
			target.setPersonId(source.getPerson().getId());
		}
		
		if (source.getDegreeType() != null) {
			target.setDegreeTypeId(source.getDegreeType().getId());
		}

		return target;
	}

}