class MarkScaleExchangeResourceConverter extends AbstractConverter<MarkScaleExchangeResource, MarkScaleExchange> {

	@Override
	public MarkScaleExchange convert(final MarkScaleExchangeResource source, final MarkScaleExchange target) {
		
		if (source.getMarkScaleId() != null) {
			MarkScale markScale = new MarkScale();
			markScale.setId(source.getMarkScaleId());
			target.setMarkScale(markScale);
		}
		
		if (source.getMarkScaleValueId() != null) {
			MarkScaleValue markScaleValue = new MarkScaleValue();
			markScaleValue.setId(source.getMarkScaleValueId());
			target.setMarkScaleValue(markScaleValue);
		}
		
		if (source.getMarkScaleExchangeId() != null) {
			MarkScale markScaleExchange = new MarkScale();
			markScaleExchange.setId(source.getMarkScaleExchangeId());
			target.setMarkScaleExchange(markScaleExchange);
		}
		
		if (source.getMarkScaleExchangeValueId() != null) {
			MarkScaleValue markScaleExchangeValue = new MarkScaleValue();
			markScaleExchangeValue.setId(source.getMarkScaleExchangeValueId());
			target.setMarkScaleExchangeValue(markScaleExchangeValue);
		}
		
		target.setMarkMin(source.getMarkMin());
		target.setMarkMax(source.getMarkMax());
		target.setMarkExchange(source.getMarkExchange());
		
		return target;
	}

}