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

import com.ankaibei.workFlow.common.online.model.OnlineColumn.OnlineColumnModelMapper;
import com.ankaibei.workFlow.common.online.vo.OnlineColumnVo;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

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

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

        List<OnlineColumnVo> list = new ArrayList<OnlineColumnVo>( arg0.size() );
        for ( OnlineColumn onlineColumn : arg0 ) {
            list.add( fromModel( onlineColumn ) );
        }

        return list;
    }

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

        List<OnlineColumn> list = new ArrayList<OnlineColumn>( arg0.size() );
        for ( OnlineColumnVo onlineColumnVo : arg0 ) {
            list.add( toModel( onlineColumnVo ) );
        }

        return list;
    }

    @Override
    public OnlineColumn toModel(OnlineColumnVo onlineColumnVo) {
        if ( onlineColumnVo == null ) {
            return null;
        }

        OnlineColumn onlineColumn = new OnlineColumn();

        onlineColumn.setColumnId( onlineColumnVo.getColumnId() );
        onlineColumn.setColumnName( onlineColumnVo.getColumnName() );
        onlineColumn.setTableId( onlineColumnVo.getTableId() );
        onlineColumn.setColumnType( onlineColumnVo.getColumnType() );
        onlineColumn.setFullColumnType( onlineColumnVo.getFullColumnType() );
        onlineColumn.setPrimaryKey( onlineColumnVo.getPrimaryKey() );
        onlineColumn.setAutoIncrement( onlineColumnVo.getAutoIncrement() );
        onlineColumn.setNullable( onlineColumnVo.getNullable() );
        onlineColumn.setColumnDefault( onlineColumnVo.getColumnDefault() );
        onlineColumn.setColumnShowOrder( onlineColumnVo.getColumnShowOrder() );
        onlineColumn.setColumnComment( onlineColumnVo.getColumnComment() );
        onlineColumn.setObjectFieldName( onlineColumnVo.getObjectFieldName() );
        onlineColumn.setObjectFieldType( onlineColumnVo.getObjectFieldType() );
        onlineColumn.setNumericPrecision( onlineColumnVo.getNumericPrecision() );
        onlineColumn.setNumericScale( onlineColumnVo.getNumericScale() );
        onlineColumn.setFilterType( onlineColumnVo.getFilterType() );
        onlineColumn.setParentKey( onlineColumnVo.getParentKey() );
        onlineColumn.setDeptFilter( onlineColumnVo.getDeptFilter() );
        onlineColumn.setUserFilter( onlineColumnVo.getUserFilter() );
        onlineColumn.setFieldKind( onlineColumnVo.getFieldKind() );
        onlineColumn.setMaxFileCount( onlineColumnVo.getMaxFileCount() );
        onlineColumn.setUploadFileSystemType( onlineColumnVo.getUploadFileSystemType() );
        onlineColumn.setEncodedRule( onlineColumnVo.getEncodedRule() );
        onlineColumn.setDictId( onlineColumnVo.getDictId() );
        onlineColumn.setUpdateTime( onlineColumnVo.getUpdateTime() );
        onlineColumn.setCreateTime( onlineColumnVo.getCreateTime() );
        onlineColumn.setFieldKindDictMap( mapToMap( onlineColumnVo.getFieldKindDictMap() ) );

        onlineColumn.setDictInfo( mapToBean(onlineColumnVo.getDictInfo(), com.ankaibei.workFlow.common.online.model.OnlineDict.class) );

        return onlineColumn;
    }

    @Override
    public OnlineColumnVo fromModel(OnlineColumn onlineColumn) {
        if ( onlineColumn == null ) {
            return null;
        }

        OnlineColumnVo onlineColumnVo = new OnlineColumnVo();

        onlineColumnVo.setColumnId( onlineColumn.getColumnId() );
        onlineColumnVo.setColumnName( onlineColumn.getColumnName() );
        onlineColumnVo.setTableId( onlineColumn.getTableId() );
        onlineColumnVo.setColumnType( onlineColumn.getColumnType() );
        onlineColumnVo.setFullColumnType( onlineColumn.getFullColumnType() );
        onlineColumnVo.setPrimaryKey( onlineColumn.getPrimaryKey() );
        onlineColumnVo.setAutoIncrement( onlineColumn.getAutoIncrement() );
        onlineColumnVo.setNullable( onlineColumn.getNullable() );
        onlineColumnVo.setColumnDefault( onlineColumn.getColumnDefault() );
        onlineColumnVo.setColumnShowOrder( onlineColumn.getColumnShowOrder() );
        onlineColumnVo.setColumnComment( onlineColumn.getColumnComment() );
        onlineColumnVo.setObjectFieldName( onlineColumn.getObjectFieldName() );
        onlineColumnVo.setObjectFieldType( onlineColumn.getObjectFieldType() );
        onlineColumnVo.setNumericPrecision( onlineColumn.getNumericPrecision() );
        onlineColumnVo.setNumericScale( onlineColumn.getNumericScale() );
        onlineColumnVo.setFilterType( onlineColumn.getFilterType() );
        onlineColumnVo.setParentKey( onlineColumn.getParentKey() );
        onlineColumnVo.setDeptFilter( onlineColumn.getDeptFilter() );
        onlineColumnVo.setUserFilter( onlineColumn.getUserFilter() );
        onlineColumnVo.setFieldKind( onlineColumn.getFieldKind() );
        onlineColumnVo.setMaxFileCount( onlineColumn.getMaxFileCount() );
        onlineColumnVo.setUploadFileSystemType( onlineColumn.getUploadFileSystemType() );
        onlineColumnVo.setEncodedRule( onlineColumn.getEncodedRule() );
        onlineColumnVo.setDictId( onlineColumn.getDictId() );
        onlineColumnVo.setUpdateTime( onlineColumn.getUpdateTime() );
        onlineColumnVo.setCreateTime( onlineColumn.getCreateTime() );
        onlineColumnVo.setFieldKindDictMap( mapToMap( onlineColumn.getFieldKindDictMap() ) );

        onlineColumnVo.setDictInfo( beanToMap(onlineColumn.getDictInfo(), false) );

        return onlineColumnVo;
    }
}
