class PaperTypeResourceConverter extends AbstractConverter<PaperTypeResource, PaperType> {

	@Override
	public PaperType convert(final PaperTypeResource source, final PaperType target) {

		target.setName(source.getName());
		target.setAbbrName(source.getAbbrName());
		
		if (source.getPaperUsageId() != null) {
			PaperUsage paperUsage = new PaperUsage();
			paperUsage.setId(source.getPaperUsageId());
			target.setPaperUsage(paperUsage);
		}

		return target;
	}

}