package com.eactive.eai.adapter.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import com.eactive.eai.adapter.AdapterVO;
import com.eactive.eai.data.entity.onl.adapter.Adapter;
import com.eactive.eai.data.mapper.BaseMapperConfig;
import com.eactive.eai.data.mapper.GenericMapper;
import com.eactive.eai.data.mapper.StringTrimMapper;

@Mapper(config = BaseMapperConfig.class)
public interface AdapterMapper extends GenericMapper<AdapterVO, Adapter> {

	@Mapping(source = "id.adptrbzwkgroupname", target = "adapterGroupName")
	@Mapping(source = "id.adptrbzwkname", target = "name")
	@Mapping(source = "eaisevrinstncname", target = "eaiSevrInstncName")
	@Mapping(source = "lstnerclsname", target = "listenerClass", qualifiedBy = StringTrimMapper.class)
	@Mapping(source = "testclsname", target = "testCallClass", qualifiedBy = StringTrimMapper.class)
	@Mapping(source = "prptygroupname", target = "propGroupName", qualifiedBy = StringTrimMapper.class)
	@Mapping(source = "adptrdesc", target = "description", qualifiedBy = StringTrimMapper.class)
	@Override
	AdapterVO toVo(Adapter entity);

}
