All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arextest.web.model.mapper.ConfigComparisonExclusionsMapperImpl Maven / Gradle / Ivy

package com.arextest.web.model.mapper;

import com.arextest.web.model.contract.contracts.config.replay.ComparisonExclusionsConfiguration;
import com.arextest.web.model.dao.mongodb.ConfigComparisonExclusionsCollection;
import java.util.ArrayList;
import java.util.List;

/*
@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 ConfigComparisonExclusionsMapperImpl implements ConfigComparisonExclusionsMapper {

    @Override
    public ComparisonExclusionsConfiguration dtoFromDao(ConfigComparisonExclusionsCollection dao) {
        if ( dao == null ) {
            return null;
        }

        ComparisonExclusionsConfiguration comparisonExclusionsConfiguration = new ComparisonExclusionsConfiguration();

        comparisonExclusionsConfiguration.setId( dao.getId() );
        comparisonExclusionsConfiguration.setAppId( dao.getAppId() );
        comparisonExclusionsConfiguration.setOperationId( dao.getOperationId() );
        comparisonExclusionsConfiguration.setExpirationType( dao.getExpirationType() );
        comparisonExclusionsConfiguration.setExpirationDate( dao.getExpirationDate() );
        comparisonExclusionsConfiguration.setCompareConfigType( dao.getCompareConfigType() );
        comparisonExclusionsConfiguration.setFsInterfaceId( dao.getFsInterfaceId() );
        comparisonExclusionsConfiguration.setDependencyId( dao.getDependencyId() );
        List list = dao.getExclusions();
        if ( list != null ) {
            comparisonExclusionsConfiguration.setExclusions( new ArrayList( list ) );
        }

        comparisonExclusionsConfiguration.setModifiedTime( dao.getDataChangeUpdateTime() == null ? null : new java.sql.Timestamp(dao.getDataChangeUpdateTime()) );

        return comparisonExclusionsConfiguration;
    }

    @Override
    public ConfigComparisonExclusionsCollection daoFromDto(ComparisonExclusionsConfiguration dto) {
        if ( dto == null ) {
            return null;
        }

        ConfigComparisonExclusionsCollection configComparisonExclusionsCollection = new ConfigComparisonExclusionsCollection();

        configComparisonExclusionsCollection.setAppId( dto.getAppId() );
        configComparisonExclusionsCollection.setOperationId( dto.getOperationId() );
        configComparisonExclusionsCollection.setExpirationType( dto.getExpirationType() );
        configComparisonExclusionsCollection.setExpirationDate( dto.getExpirationDate() );
        configComparisonExclusionsCollection.setCompareConfigType( dto.getCompareConfigType() );
        configComparisonExclusionsCollection.setFsInterfaceId( dto.getFsInterfaceId() );
        configComparisonExclusionsCollection.setDependencyId( dto.getDependencyId() );
        List list = dto.getExclusions();
        if ( list != null ) {
            configComparisonExclusionsCollection.setExclusions( new ArrayList( list ) );
        }

        configComparisonExclusionsCollection.setId( null );
        configComparisonExclusionsCollection.setDataChangeCreateTime( System.currentTimeMillis() );
        configComparisonExclusionsCollection.setDataChangeUpdateTime( System.currentTimeMillis() );

        return configComparisonExclusionsCollection;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy