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

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

There is a newer version: 0.6.5.5
Show newest version
package com.arextest.web.model.mapper;

import com.arextest.web.model.contract.contracts.config.replay.ComparisonInclusionsConfiguration;
import com.arextest.web.model.dao.mongodb.ConfigComparisonInclusionsCollection;
import java.util.ArrayList;
import java.util.List;
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 ConfigComparisonInclusionsMapperImpl implements ConfigComparisonInclusionsMapper {

    @Override
    public ComparisonInclusionsConfiguration dtoFromDao(ConfigComparisonInclusionsCollection dao) {
        if ( dao == null ) {
            return null;
        }

        ComparisonInclusionsConfiguration comparisonInclusionsConfiguration = new ComparisonInclusionsConfiguration();

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

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

        return comparisonInclusionsConfiguration;
    }

    @Override
    public ConfigComparisonInclusionsCollection daoFromDto(ComparisonInclusionsConfiguration dto) {
        if ( dto == null ) {
            return null;
        }

        ConfigComparisonInclusionsCollection configComparisonInclusionsCollection = new ConfigComparisonInclusionsCollection();

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

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

        return configComparisonInclusionsCollection;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy