com.arextest.web.model.mapper.ManualReportPlanItemMapperImpl Maven / Gradle / Ivy
package com.arextest.web.model.mapper;
import com.arextest.web.model.contract.contracts.filesystem.AddressType;
import com.arextest.web.model.contract.contracts.manualreport.ReportInterfaceType;
import com.arextest.web.model.dao.mongodb.ManualReportPlanItemCollection;
import com.arextest.web.model.dao.mongodb.entity.AddressDao;
import com.arextest.web.model.dto.filesystem.AddressDto;
import com.arextest.web.model.dto.filesystem.FSInterfaceDto;
import com.arextest.web.model.dto.manualreport.ManualReportPlanItemDto;
import javax.annotation.Generated;
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-09-25T05:48:00+0000",
comments = "version: 1.5.5.Final, compiler: javac, environment: Java 11.0.24 (Eclipse Adoptium)"
)
public class ManualReportPlanItemMapperImpl implements ManualReportPlanItemMapper {
@Override
public ManualReportPlanItemDto dtoFromFsInterfaceDto(FSInterfaceDto dto) {
if ( dto == null ) {
return null;
}
ManualReportPlanItemDto manualReportPlanItemDto = new ManualReportPlanItemDto();
manualReportPlanItemDto.setId( dto.getId() );
manualReportPlanItemDto.setTestAddress( addressDtoToAddressDao( dto.getTestAddress() ) );
return manualReportPlanItemDto;
}
@Override
public ManualReportPlanItemDto dtoFromDao(ManualReportPlanItemCollection dao) {
if ( dao == null ) {
return null;
}
ManualReportPlanItemDto manualReportPlanItemDto = new ManualReportPlanItemDto();
manualReportPlanItemDto.setId( dao.getId() );
manualReportPlanItemDto.setPlanId( dao.getPlanId() );
manualReportPlanItemDto.setInterfaceName( dao.getInterfaceName() );
manualReportPlanItemDto.setTestAddress( dao.getTestAddress() );
return manualReportPlanItemDto;
}
@Override
public ManualReportPlanItemCollection daoFromDto(ManualReportPlanItemDto dto) {
if ( dto == null ) {
return null;
}
ManualReportPlanItemCollection manualReportPlanItemCollection = new ManualReportPlanItemCollection();
manualReportPlanItemCollection.setId( dto.getId() );
manualReportPlanItemCollection.setPlanId( dto.getPlanId() );
manualReportPlanItemCollection.setInterfaceName( dto.getInterfaceName() );
manualReportPlanItemCollection.setTestAddress( dto.getTestAddress() );
return manualReportPlanItemCollection;
}
@Override
public ReportInterfaceType contractFromDto(ManualReportPlanItemDto dto) {
if ( dto == null ) {
return null;
}
ReportInterfaceType reportInterfaceType = new ReportInterfaceType();
reportInterfaceType.setId( dto.getId() );
reportInterfaceType.setInterfaceName( dto.getInterfaceName() );
reportInterfaceType.setTestAddress( addressDaoToAddressType( dto.getTestAddress() ) );
return reportInterfaceType;
}
protected AddressDao addressDtoToAddressDao(AddressDto addressDto) {
if ( addressDto == null ) {
return null;
}
AddressDao addressDao = new AddressDao();
addressDao.setMethod( addressDto.getMethod() );
addressDao.setEndpoint( addressDto.getEndpoint() );
return addressDao;
}
protected AddressType addressDaoToAddressType(AddressDao addressDao) {
if ( addressDao == null ) {
return null;
}
AddressType addressType = new AddressType();
addressType.setMethod( addressDao.getMethod() );
addressType.setEndpoint( addressDao.getEndpoint() );
return addressType;
}
}