package com.eactive.eai.rms.common.comDomain;

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.mapper.GenericMapper;
import com.eactive.eai.rms.data.entity.onl.adapter.CommonDomain;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface CommonDomainUIMapper extends GenericMapper<CommonDomainUI, CommonDomain> {

	@Override
	@Mapping(target = "domainNM", source = "domainNm")
	CommonDomainUI toVo(CommonDomain entity);

	@Override
	@InheritInverseConfiguration
	CommonDomain toEntity(CommonDomainUI vo);

	@InheritInverseConfiguration
	@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
	void updateToEntity(CommonDomainUI commonDomainUI, @MappingTarget CommonDomain commonDomain);
}
