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

com.arextest.schedule.model.converter.TransformConfigConverterImpl Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package com.arextest.schedule.model.converter;

import com.arextest.diff.model.TransformConfig;
import com.arextest.web.model.contract.contracts.compare.TransformDetail;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2024-09-18T03:35:13+0000",
    comments = "version: 1.5.5.Final, compiler: javac, environment: Java 11.0.24 (Eclipse Adoptium)"
)
public class TransformConfigConverterImpl implements TransformConfigConverter {

    @Override
    public TransformConfig toTransformConfig(TransformDetail transformDetail) {
        if ( transformDetail == null ) {
            return null;
        }

        TransformConfig transformConfig = new TransformConfig();

        transformConfig.setTransformMethods( transformMethodListToTransformMethodList( transformDetail.getTransformMethods() ) );

        transformConfig.setNodePath( transformDetail.getNodePath() == null ? null : java.util.Collections.singletonList(transformDetail.getNodePath()) );

        return transformConfig;
    }

    protected TransformConfig.TransformMethod transformMethodToTransformMethod(TransformDetail.TransformMethod transformMethod) {
        if ( transformMethod == null ) {
            return null;
        }

        TransformConfig.TransformMethod transformMethod1 = new TransformConfig.TransformMethod();

        transformMethod1.setMethodName( transformMethod.getMethodName() );
        transformMethod1.setMethodArgs( transformMethod.getMethodArgs() );

        return transformMethod1;
    }

    protected List transformMethodListToTransformMethodList(List list) {
        if ( list == null ) {
            return null;
        }

        List list1 = new ArrayList( list.size() );
        for ( TransformDetail.TransformMethod transformMethod : list ) {
            list1.add( transformMethodToTransformMethod( transformMethod ) );
        }

        return list1;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy