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

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

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

import com.arextest.web.model.contract.contracts.QuerySceneInfoResponseType;
import com.arextest.web.model.dto.iosummary.DiffDetail;
import com.arextest.web.model.dto.iosummary.SubSceneInfo;
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 SubSceneInfoMapperImpl implements SubSceneInfoMapper {

    @Override
    public QuerySceneInfoResponseType.SubSceneInfoType contractFromDto(SubSceneInfo subSceneInfo) {
        if ( subSceneInfo == null ) {
            return null;
        }

        QuerySceneInfoResponseType.SubSceneInfoType subSceneInfoType = new QuerySceneInfoResponseType.SubSceneInfoType();

        subSceneInfoType.setCount( subSceneInfo.getCount() );
        subSceneInfoType.setRecordId( subSceneInfo.getRecordId() );
        subSceneInfoType.setReplayId( subSceneInfo.getReplayId() );
        subSceneInfoType.setFeedbackType( subSceneInfo.getFeedbackType() );
        subSceneInfoType.setRemark( subSceneInfo.getRemark() );
        subSceneInfoType.setDetails( diffDetailListToDiffDetailTypeList( subSceneInfo.getDetails() ) );

        return subSceneInfoType;
    }

    protected QuerySceneInfoResponseType.DiffDetailType diffDetailToDiffDetailType(DiffDetail diffDetail) {
        if ( diffDetail == null ) {
            return null;
        }

        QuerySceneInfoResponseType.DiffDetailType diffDetailType = new QuerySceneInfoResponseType.DiffDetailType();

        diffDetailType.setCode( diffDetail.getCode() );
        diffDetailType.setCategoryName( diffDetail.getCategoryName() );
        diffDetailType.setOperationName( diffDetail.getOperationName() );

        return diffDetailType;
    }

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

        List list1 = new ArrayList( list.size() );
        for ( DiffDetail diffDetail : list ) {
            list1.add( diffDetailToDiffDetailType( diffDetail ) );
        }

        return list1;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy