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

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

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

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

/*
@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2024-12-23T06:09:23+0000",
    comments = "version: 1.5.5.Final, compiler: javac, environment: Java 21.0.5 (Eclipse Adoptium)"
)
*/
public class ConfigComparisonEncryptionMapperImpl implements ConfigComparisonEncryptionMapper {

    @Override
    public ComparisonEncryptionConfiguration dtoFromDao(ConfigComparisonEncryptionCollection dao) {
        if ( dao == null ) {
            return null;
        }

        ComparisonEncryptionConfiguration comparisonEncryptionConfiguration = new ComparisonEncryptionConfiguration();

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

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

        return comparisonEncryptionConfiguration;
    }

    @Override
    public ConfigComparisonEncryptionCollection daoFromDto(ComparisonEncryptionConfiguration dto) {
        if ( dto == null ) {
            return null;
        }

        ConfigComparisonEncryptionCollection configComparisonEncryptionCollection = new ConfigComparisonEncryptionCollection();

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

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

        return configComparisonEncryptionCollection;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy