package com.ankaibei.workFlow.common.flow.model;

import com.ankaibei.workFlow.common.flow.model.FlowEntry.FlowEntryModelMapper;
import com.ankaibei.workFlow.common.flow.vo.FlowEntryVo;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2023-05-08T14:15:52+0800",
    comments = "version: 1.4.2.Final, compiler: javac, environment: Java 1.8.0_144 (Oracle Corporation)"
)
public class FlowEntry$FlowEntryModelMapperImpl implements FlowEntryModelMapper {

    @Override
    public List<FlowEntryVo> fromModelList(List<FlowEntry> arg0) {
        if ( arg0 == null ) {
            return null;
        }

        List<FlowEntryVo> list = new ArrayList<FlowEntryVo>( arg0.size() );
        for ( FlowEntry flowEntry : arg0 ) {
            list.add( fromModel( flowEntry ) );
        }

        return list;
    }

    @Override
    public List<FlowEntry> toModelList(List<FlowEntryVo> arg0) {
        if ( arg0 == null ) {
            return null;
        }

        List<FlowEntry> list = new ArrayList<FlowEntry>( arg0.size() );
        for ( FlowEntryVo flowEntryVo : arg0 ) {
            list.add( toModel( flowEntryVo ) );
        }

        return list;
    }

    @Override
    public FlowEntry toModel(FlowEntryVo flowEntryVo) {
        if ( flowEntryVo == null ) {
            return null;
        }

        FlowEntry flowEntry = new FlowEntry();

        flowEntry.setEntryId( flowEntryVo.getEntryId() );
        flowEntry.setProcessDefinitionName( flowEntryVo.getProcessDefinitionName() );
        flowEntry.setProcessDefinitionKey( flowEntryVo.getProcessDefinitionKey() );
        flowEntry.setCategoryId( flowEntryVo.getCategoryId() );
        flowEntry.setMainEntryPublishId( flowEntryVo.getMainEntryPublishId() );
        flowEntry.setLatestPublishTime( flowEntryVo.getLatestPublishTime() );
        flowEntry.setStatus( flowEntryVo.getStatus() );
        flowEntry.setBpmnXml( flowEntryVo.getBpmnXml() );
        flowEntry.setBindFormType( flowEntryVo.getBindFormType() );
        flowEntry.setPageId( flowEntryVo.getPageId() );
        flowEntry.setDefaultFormId( flowEntryVo.getDefaultFormId() );
        flowEntry.setDefaultRouterName( flowEntryVo.getDefaultRouterName() );
        flowEntry.setEncodedRule( flowEntryVo.getEncodedRule() );
        flowEntry.setExtensionData( flowEntryVo.getExtensionData() );
        flowEntry.setUpdateTime( flowEntryVo.getUpdateTime() );
        flowEntry.setUpdateUserId( flowEntryVo.getUpdateUserId() );
        flowEntry.setCreateTime( flowEntryVo.getCreateTime() );
        flowEntry.setCreateUserId( flowEntryVo.getCreateUserId() );

        flowEntry.setMainFlowEntryPublish( mapToBean(flowEntryVo.getMainFlowEntryPublish(), com.ankaibei.workFlow.common.flow.model.FlowEntryPublish.class) );
        flowEntry.setFlowCategory( mapToBean(flowEntryVo.getFlowCategory(), com.ankaibei.workFlow.common.flow.model.FlowCategory.class) );

        return flowEntry;
    }

    @Override
    public FlowEntryVo fromModel(FlowEntry flowEntry) {
        if ( flowEntry == null ) {
            return null;
        }

        FlowEntryVo flowEntryVo = new FlowEntryVo();

        flowEntryVo.setEntryId( flowEntry.getEntryId() );
        flowEntryVo.setProcessDefinitionName( flowEntry.getProcessDefinitionName() );
        flowEntryVo.setProcessDefinitionKey( flowEntry.getProcessDefinitionKey() );
        flowEntryVo.setCategoryId( flowEntry.getCategoryId() );
        flowEntryVo.setMainEntryPublishId( flowEntry.getMainEntryPublishId() );
        flowEntryVo.setLatestPublishTime( flowEntry.getLatestPublishTime() );
        flowEntryVo.setStatus( flowEntry.getStatus() );
        flowEntryVo.setBpmnXml( flowEntry.getBpmnXml() );
        flowEntryVo.setBindFormType( flowEntry.getBindFormType() );
        flowEntryVo.setPageId( flowEntry.getPageId() );
        flowEntryVo.setDefaultFormId( flowEntry.getDefaultFormId() );
        flowEntryVo.setDefaultRouterName( flowEntry.getDefaultRouterName() );
        flowEntryVo.setEncodedRule( flowEntry.getEncodedRule() );
        flowEntryVo.setExtensionData( flowEntry.getExtensionData() );
        flowEntryVo.setUpdateTime( flowEntry.getUpdateTime() );
        flowEntryVo.setUpdateUserId( flowEntry.getUpdateUserId() );
        flowEntryVo.setCreateTime( flowEntry.getCreateTime() );
        flowEntryVo.setCreateUserId( flowEntry.getCreateUserId() );

        flowEntryVo.setMainFlowEntryPublish( beanToMap(flowEntry.getMainFlowEntryPublish(), false) );
        flowEntryVo.setFlowCategory( beanToMap(flowEntry.getFlowCategory(), false) );

        return flowEntryVo;
    }
}
