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

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

The newest version!
package com.arextest.web.model.mapper;

import com.arextest.web.model.contract.contracts.config.replay.ComparisonReferenceConfiguration;
import com.arextest.web.model.dao.mongodb.ConfigComparisonReferenceCollection;
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 ConfigComparisonReferenceMapperImpl implements ConfigComparisonReferenceMapper {

    @Override
    public ComparisonReferenceConfiguration dtoFromDao(ConfigComparisonReferenceCollection dao) {
        if ( dao == null ) {
            return null;
        }

        ComparisonReferenceConfiguration comparisonReferenceConfiguration = new ComparisonReferenceConfiguration();

        comparisonReferenceConfiguration.setId( dao.getId() );
        comparisonReferenceConfiguration.setAppId( dao.getAppId() );
        comparisonReferenceConfiguration.setOperationId( dao.getOperationId() );
        comparisonReferenceConfiguration.setExpirationType( dao.getExpirationType() );
        comparisonReferenceConfiguration.setExpirationDate( dao.getExpirationDate() );
        comparisonReferenceConfiguration.setCompareConfigType( dao.getCompareConfigType() );
        comparisonReferenceConfiguration.setFsInterfaceId( dao.getFsInterfaceId() );
        comparisonReferenceConfiguration.setDependencyId( dao.getDependencyId() );
        List list = dao.getPkPath();
        if ( list != null ) {
            comparisonReferenceConfiguration.setPkPath( new ArrayList( list ) );
        }
        List list1 = dao.getFkPath();
        if ( list1 != null ) {
            comparisonReferenceConfiguration.setFkPath( new ArrayList( list1 ) );
        }

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

        return comparisonReferenceConfiguration;
    }

    @Override
    public ConfigComparisonReferenceCollection daoFromDto(ComparisonReferenceConfiguration dto) {
        if ( dto == null ) {
            return null;
        }

        ConfigComparisonReferenceCollection configComparisonReferenceCollection = new ConfigComparisonReferenceCollection();

        configComparisonReferenceCollection.setAppId( dto.getAppId() );
        configComparisonReferenceCollection.setOperationId( dto.getOperationId() );
        configComparisonReferenceCollection.setExpirationType( dto.getExpirationType() );
        configComparisonReferenceCollection.setExpirationDate( dto.getExpirationDate() );
        configComparisonReferenceCollection.setCompareConfigType( dto.getCompareConfigType() );
        configComparisonReferenceCollection.setFsInterfaceId( dto.getFsInterfaceId() );
        configComparisonReferenceCollection.setDependencyId( dto.getDependencyId() );
        List list = dto.getPkPath();
        if ( list != null ) {
            configComparisonReferenceCollection.setPkPath( new ArrayList( list ) );
        }
        List list1 = dto.getFkPath();
        if ( list1 != null ) {
            configComparisonReferenceCollection.setFkPath( new ArrayList( list1 ) );
        }

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

        return configComparisonReferenceCollection;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy