package com.eactive.eai.rms.onl.manage.serviceinfo.b2badaptermap;

import org.mapstruct.BeanMapping;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;

import com.eactive.eai.data.entity.onl.b2badaptermapping.B2BAdapterMap;
import com.eactive.eai.data.mapper.GenericMapper;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {})
public interface B2bAdapterMapManMapper extends GenericMapper<B2bAdapterMapUI, B2BAdapterMap> {
	@Override
	@Mapping(source = "id.eaisevrinstncname", target = "eaiSevrInstncName")
	@Mapping(source = "id.eaisvcname", target = "eaiSvcName")
	@Mapping(source = "id.extnlinstiidnfiname", target = "extnlInstiIdnfiName")
	@Mapping(source = "id.dmnddtalsbzwkdsticname", target = "dmndDtalsBzwkDsticName")
	@Mapping(source = "adptrbzwkname", target = "adptrBzwkName")
	@Mapping(source = "psvsysadptrbzwkgroupname", target = "psvSysAdptrBzwkGroupName")
	B2bAdapterMapUI toVo(B2BAdapterMap entity);

	@Override
	@InheritInverseConfiguration
	B2BAdapterMap toEntity(B2bAdapterMapUI vo);

	@InheritInverseConfiguration
	@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
	void updateToEntity(B2bAdapterMapUI vo, @MappingTarget B2BAdapterMap entity);
}
