com.arextest.web.model.mapper.PageQueryComparisonMapperImpl Maven / Gradle / Ivy
package com.arextest.web.model.mapper;
import com.arextest.config.model.dto.application.Dependency;
import com.arextest.web.model.contract.contracts.config.replay.ComparisonExclusionsConfiguration;
import com.arextest.web.model.contract.contracts.config.replay.ComparisonIgnoreCategoryConfiguration;
import com.arextest.web.model.contract.contracts.config.replay.ComparisonInclusionsConfiguration;
import com.arextest.web.model.contract.contracts.config.replay.ComparisonListSortConfiguration;
import com.arextest.web.model.contract.contracts.config.replay.ComparisonReferenceConfiguration;
import com.arextest.web.model.contract.contracts.config.replay.ComparisonScriptConfiguration;
import com.arextest.web.model.contract.contracts.config.replay.ComparisonTransformConfiguration;
import com.arextest.web.model.contract.contracts.config.replay.PageQueryCategoryRequestType;
import com.arextest.web.model.contract.contracts.config.replay.PageQueryComparisonRequestType;
import com.arextest.web.model.contract.contracts.config.replay.PageQueryComparisonResponseType;
import com.arextest.web.model.contract.contracts.config.replay.PageQueryExclusionRequestType;
import com.arextest.web.model.contract.contracts.config.replay.PageQueryListSortRequestType;
import com.arextest.web.model.contract.contracts.config.replay.PageQueryTransformRequestType;
import com.arextest.web.model.dto.config.PageQueryCategoryDto;
import com.arextest.web.model.dto.config.PageQueryComparisonDto;
import com.arextest.web.model.dto.config.PageQueryExclusionDto;
import com.arextest.web.model.dto.config.PageQueryListSortDto;
import com.arextest.web.model.dto.config.PageQueryTransformDto;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/*
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-12-23T06:09:22+0000",
comments = "version: 1.5.5.Final, compiler: javac, environment: Java 21.0.5 (Eclipse Adoptium)"
)
*/
public class PageQueryComparisonMapperImpl implements PageQueryComparisonMapper {
@Override
public PageQueryComparisonDto dtoFromContract(PageQueryComparisonRequestType contract) {
if ( contract == null ) {
return null;
}
PageQueryComparisonDto pageQueryComparisonDto = new PageQueryComparisonDto();
pageQueryComparisonDto.setAppId( contract.getAppId() );
pageQueryComparisonDto.setKeyOfOperationName( contract.getKeyOfOperationName() );
pageQueryComparisonDto.setKeyOfDependencyName( contract.getKeyOfDependencyName() );
pageQueryComparisonDto.setPageIndex( contract.getPageIndex() );
pageQueryComparisonDto.setPageSize( contract.getPageSize() );
pageQueryComparisonDto.setNeedTotal( contract.getNeedTotal() );
return pageQueryComparisonDto;
}
@Override
public PageQueryExclusionDto dtoFromContract(PageQueryExclusionRequestType contract) {
if ( contract == null ) {
return null;
}
PageQueryExclusionDto pageQueryExclusionDto = new PageQueryExclusionDto();
pageQueryExclusionDto.setAppId( contract.getAppId() );
pageQueryExclusionDto.setKeyOfOperationName( contract.getKeyOfOperationName() );
pageQueryExclusionDto.setKeyOfDependencyName( contract.getKeyOfDependencyName() );
pageQueryExclusionDto.setPageIndex( contract.getPageIndex() );
pageQueryExclusionDto.setPageSize( contract.getPageSize() );
pageQueryExclusionDto.setNeedTotal( contract.getNeedTotal() );
pageQueryExclusionDto.setKeyOfExclusionPath( contract.getKeyOfExclusionPath() );
return pageQueryExclusionDto;
}
@Override
public PageQueryListSortDto dtoFromContract(PageQueryListSortRequestType contract) {
if ( contract == null ) {
return null;
}
PageQueryListSortDto pageQueryListSortDto = new PageQueryListSortDto();
pageQueryListSortDto.setAppId( contract.getAppId() );
pageQueryListSortDto.setKeyOfOperationName( contract.getKeyOfOperationName() );
pageQueryListSortDto.setKeyOfDependencyName( contract.getKeyOfDependencyName() );
pageQueryListSortDto.setPageIndex( contract.getPageIndex() );
pageQueryListSortDto.setPageSize( contract.getPageSize() );
pageQueryListSortDto.setNeedTotal( contract.getNeedTotal() );
pageQueryListSortDto.setKeyOfListPath( contract.getKeyOfListPath() );
pageQueryListSortDto.setKeyOfValue( contract.getKeyOfValue() );
return pageQueryListSortDto;
}
@Override
public PageQueryCategoryDto dtoFromContract(PageQueryCategoryRequestType contract) {
if ( contract == null ) {
return null;
}
PageQueryCategoryDto pageQueryCategoryDto = new PageQueryCategoryDto();
pageQueryCategoryDto.setAppId( contract.getAppId() );
pageQueryCategoryDto.setKeyOfOperationName( contract.getKeyOfOperationName() );
pageQueryCategoryDto.setKeyOfDependencyName( contract.getKeyOfDependencyName() );
pageQueryCategoryDto.setPageIndex( contract.getPageIndex() );
pageQueryCategoryDto.setPageSize( contract.getPageSize() );
pageQueryCategoryDto.setNeedTotal( contract.getNeedTotal() );
pageQueryCategoryDto.setKeyOfIgnoreOperationType( contract.getKeyOfIgnoreOperationType() );
pageQueryCategoryDto.setKeyOfIgnoreOperationName( contract.getKeyOfIgnoreOperationName() );
return pageQueryCategoryDto;
}
@Override
public PageQueryTransformDto dtoFromContract(PageQueryTransformRequestType contract) {
if ( contract == null ) {
return null;
}
PageQueryTransformDto pageQueryTransformDto = new PageQueryTransformDto();
pageQueryTransformDto.setAppId( contract.getAppId() );
pageQueryTransformDto.setKeyOfOperationName( contract.getKeyOfOperationName() );
pageQueryTransformDto.setKeyOfDependencyName( contract.getKeyOfDependencyName() );
pageQueryTransformDto.setPageIndex( contract.getPageIndex() );
pageQueryTransformDto.setPageSize( contract.getPageSize() );
pageQueryTransformDto.setNeedTotal( contract.getNeedTotal() );
pageQueryTransformDto.setKeyOfMethodName( contract.getKeyOfMethodName() );
return pageQueryTransformDto;
}
@Override
public PageQueryComparisonResponseType.ExclusionInfo contractFromDto(ComparisonExclusionsConfiguration dto, Map operationInfo, Map dependencyInfo) {
if ( dto == null ) {
return null;
}
PageQueryComparisonResponseType.ExclusionInfo exclusionInfo = new PageQueryComparisonResponseType.ExclusionInfo();
List list = dto.getExclusions();
if ( list != null ) {
exclusionInfo.setExclusionPath( new ArrayList( list ) );
}
exclusionInfo.setOperationName( getOperationName( dto, operationInfo ) );
exclusionInfo.setDependencyName( getDependencyName( dto, dependencyInfo ) );
exclusionInfo.setDependencyType( getDependencyType( dto, dependencyInfo ) );
exclusionInfo.setId( dto.getId() );
exclusionInfo.setExpirationType( dto.getExpirationType() );
exclusionInfo.setExpirationDate( dto.getExpirationDate() != null ? dto.getExpirationDate().getTime() : null );
return exclusionInfo;
}
@Override
public PageQueryComparisonResponseType.InclusionInfo contractFromDto(ComparisonInclusionsConfiguration dto, Map operationInfo, Map dependencyInfo) {
if ( dto == null ) {
return null;
}
PageQueryComparisonResponseType.InclusionInfo inclusionInfo = new PageQueryComparisonResponseType.InclusionInfo();
List list = dto.getInclusions();
if ( list != null ) {
inclusionInfo.setInclusionPath( new ArrayList( list ) );
}
inclusionInfo.setOperationName( getOperationName( dto, operationInfo ) );
inclusionInfo.setDependencyName( getDependencyName( dto, dependencyInfo ) );
inclusionInfo.setDependencyType( getDependencyType( dto, dependencyInfo ) );
inclusionInfo.setId( dto.getId() );
inclusionInfo.setExpirationType( dto.getExpirationType() );
inclusionInfo.setExpirationDate( dto.getExpirationDate() != null ? dto.getExpirationDate().getTime() : null );
return inclusionInfo;
}
@Override
public PageQueryComparisonResponseType.IgnoreCategoryInfo contractFromDto(ComparisonIgnoreCategoryConfiguration dto, Map operationInfo, Map dependencyInfo) {
if ( dto == null ) {
return null;
}
PageQueryComparisonResponseType.IgnoreCategoryInfo ignoreCategoryInfo = new PageQueryComparisonResponseType.IgnoreCategoryInfo();
ignoreCategoryInfo.setOperationName( getOperationName( dto, operationInfo ) );
ignoreCategoryInfo.setDependencyName( getDependencyName( dto, dependencyInfo ) );
ignoreCategoryInfo.setDependencyType( getDependencyType( dto, dependencyInfo ) );
ignoreCategoryInfo.setId( dto.getId() );
ignoreCategoryInfo.setExpirationType( dto.getExpirationType() );
ignoreCategoryInfo.setIgnoreCategoryDetail( dto.getIgnoreCategoryDetail() );
ignoreCategoryInfo.setExpirationDate( dto.getExpirationDate() != null ? dto.getExpirationDate().getTime() : null );
return ignoreCategoryInfo;
}
@Override
public PageQueryComparisonResponseType.ListSortInfo contractFromDto(ComparisonListSortConfiguration dto, Map operationInfo, Map dependencyInfo) {
if ( dto == null ) {
return null;
}
PageQueryComparisonResponseType.ListSortInfo listSortInfo = new PageQueryComparisonResponseType.ListSortInfo();
listSortInfo.setOperationName( getOperationName( dto, operationInfo ) );
listSortInfo.setDependencyName( getDependencyName( dto, dependencyInfo ) );
listSortInfo.setDependencyType( getDependencyType( dto, dependencyInfo ) );
listSortInfo.setId( dto.getId() );
listSortInfo.setExpirationType( dto.getExpirationType() );
List list = dto.getListPath();
if ( list != null ) {
listSortInfo.setListPath( new ArrayList( list ) );
}
List> list1 = dto.getKeys();
if ( list1 != null ) {
listSortInfo.setKeys( new ArrayList>( list1 ) );
}
listSortInfo.setExpirationDate( dto.getExpirationDate() != null ? dto.getExpirationDate().getTime() : null );
return listSortInfo;
}
@Override
public PageQueryComparisonResponseType.ReferenceInfo contractFromDto(ComparisonReferenceConfiguration dto, Map operationInfo, Map dependencyInfo) {
if ( dto == null ) {
return null;
}
PageQueryComparisonResponseType.ReferenceInfo referenceInfo = new PageQueryComparisonResponseType.ReferenceInfo();
referenceInfo.setOperationName( getOperationName( dto, operationInfo ) );
referenceInfo.setDependencyName( getDependencyName( dto, dependencyInfo ) );
referenceInfo.setDependencyType( getDependencyType( dto, dependencyInfo ) );
referenceInfo.setId( dto.getId() );
referenceInfo.setExpirationType( dto.getExpirationType() );
List list = dto.getPkPath();
if ( list != null ) {
referenceInfo.setPkPath( new ArrayList( list ) );
}
List list1 = dto.getFkPath();
if ( list1 != null ) {
referenceInfo.setFkPath( new ArrayList( list1 ) );
}
referenceInfo.setExpirationDate( dto.getExpirationDate() != null ? dto.getExpirationDate().getTime() : null );
return referenceInfo;
}
@Override
public PageQueryComparisonResponseType.RootTransformInfo contractFromDto(ComparisonTransformConfiguration dto, Map operationInfo, Map dependencyInfo) {
if ( dto == null ) {
return null;
}
PageQueryComparisonResponseType.RootTransformInfo rootTransformInfo = new PageQueryComparisonResponseType.RootTransformInfo();
rootTransformInfo.setTransformMethodName( toTransformMethodName( dto.getTransformDetail() ) );
rootTransformInfo.setOperationName( getOperationName( dto, operationInfo ) );
rootTransformInfo.setDependencyName( getDependencyName( dto, dependencyInfo ) );
rootTransformInfo.setDependencyType( getDependencyType( dto, dependencyInfo ) );
rootTransformInfo.setId( dto.getId() );
rootTransformInfo.setExpirationType( dto.getExpirationType() );
rootTransformInfo.setExpirationDate( dto.getExpirationDate() != null ? dto.getExpirationDate().getTime() : null );
return rootTransformInfo;
}
@Override
public PageQueryComparisonResponseType.ScriptInfo contractFromDto(ComparisonScriptConfiguration dto, Map operationInfo, Map dependencyInfo) {
if ( dto == null ) {
return null;
}
PageQueryComparisonResponseType.ScriptInfo scriptInfo = new PageQueryComparisonResponseType.ScriptInfo();
scriptInfo.setOperationName( getOperationName( dto, operationInfo ) );
scriptInfo.setDependencyName( getDependencyName( dto, dependencyInfo ) );
scriptInfo.setDependencyType( getDependencyType( dto, dependencyInfo ) );
scriptInfo.setId( dto.getId() );
scriptInfo.setExpirationType( dto.getExpirationType() );
List list = dto.getNodePath();
if ( list != null ) {
scriptInfo.setNodePath( new ArrayList( list ) );
}
scriptInfo.setScriptMethod( dto.getScriptMethod() );
scriptInfo.setExpirationDate( dto.getExpirationDate() != null ? dto.getExpirationDate().getTime() : null );
return scriptInfo;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy