package com.artfess.manage.safty.manager.mapper;

import com.artfess.manage.safty.manager.dto.CmgtSaftyTrainingProjectDto;
import com.artfess.manage.safty.model.CmgtSaftyTrainingProject;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;
import org.springframework.stereotype.Component;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2023-05-08T09:35:57+0800",
    comments = "version: 1.2.0.Final, compiler: javac, environment: Java 1.8.0_71 (Oracle Corporation)"
)
@Component
public class CmgtSaftyTrainingProjectDtoMapperImpl implements CmgtSaftyTrainingProjectDtoMapper {

    @Override
    public CmgtSaftyTrainingProject toEntity(CmgtSaftyTrainingProjectDto dto) {
        if ( dto == null ) {
            return null;
        }

        CmgtSaftyTrainingProject cmgtSaftyTrainingProject = new CmgtSaftyTrainingProject();

        cmgtSaftyTrainingProject.setCreateBy( dto.getCreateBy() );
        cmgtSaftyTrainingProject.setCreateOrgId( dto.getCreateOrgId() );
        cmgtSaftyTrainingProject.setCreateTime( dto.getCreateTime() );
        cmgtSaftyTrainingProject.setUpdateBy( dto.getUpdateBy() );
        cmgtSaftyTrainingProject.setUpdateTime( dto.getUpdateTime() );
        cmgtSaftyTrainingProject.setIsDelete( dto.getIsDelete() );
        cmgtSaftyTrainingProject.setVersion( dto.getVersion() );
        cmgtSaftyTrainingProject.setLastTime( dto.getLastTime() );
        cmgtSaftyTrainingProject.setTrainingType( dto.getTrainingType() );
        cmgtSaftyTrainingProject.setPxpl( dto.getPxpl() );
        cmgtSaftyTrainingProject.setName( dto.getName() );
        cmgtSaftyTrainingProject.setPxdx( dto.getPxdx() );
        cmgtSaftyTrainingProject.setGoal( dto.getGoal() );
        cmgtSaftyTrainingProject.setContent( dto.getContent() );
        cmgtSaftyTrainingProject.setSn( dto.getSn() );
        cmgtSaftyTrainingProject.setMemo( dto.getMemo() );
        cmgtSaftyTrainingProject.setId( dto.getId() );

        return cmgtSaftyTrainingProject;
    }

    @Override
    public CmgtSaftyTrainingProjectDto toDto(CmgtSaftyTrainingProject entity) {
        if ( entity == null ) {
            return null;
        }

        CmgtSaftyTrainingProjectDto cmgtSaftyTrainingProjectDto = new CmgtSaftyTrainingProjectDto();

        cmgtSaftyTrainingProjectDto.setCreateBy( entity.getCreateBy() );
        cmgtSaftyTrainingProjectDto.setCreateOrgId( entity.getCreateOrgId() );
        cmgtSaftyTrainingProjectDto.setCreateTime( entity.getCreateTime() );
        cmgtSaftyTrainingProjectDto.setUpdateBy( entity.getUpdateBy() );
        cmgtSaftyTrainingProjectDto.setUpdateTime( entity.getUpdateTime() );
        cmgtSaftyTrainingProjectDto.setIsDelete( entity.getIsDelete() );
        cmgtSaftyTrainingProjectDto.setVersion( entity.getVersion() );
        cmgtSaftyTrainingProjectDto.setLastTime( entity.getLastTime() );
        cmgtSaftyTrainingProjectDto.setTrainingType( entity.getTrainingType() );
        cmgtSaftyTrainingProjectDto.setPxpl( entity.getPxpl() );
        cmgtSaftyTrainingProjectDto.setName( entity.getName() );
        cmgtSaftyTrainingProjectDto.setPxdx( entity.getPxdx() );
        cmgtSaftyTrainingProjectDto.setGoal( entity.getGoal() );
        cmgtSaftyTrainingProjectDto.setContent( entity.getContent() );
        cmgtSaftyTrainingProjectDto.setSn( entity.getSn() );
        cmgtSaftyTrainingProjectDto.setMemo( entity.getMemo() );
        cmgtSaftyTrainingProjectDto.setId( entity.getId() );

        return cmgtSaftyTrainingProjectDto;
    }

    @Override
    public List<CmgtSaftyTrainingProject> toEntity(List<CmgtSaftyTrainingProjectDto> dtoList) {
        if ( dtoList == null ) {
            return null;
        }

        List<CmgtSaftyTrainingProject> list = new ArrayList<CmgtSaftyTrainingProject>( dtoList.size() );
        for ( CmgtSaftyTrainingProjectDto cmgtSaftyTrainingProjectDto : dtoList ) {
            list.add( toEntity( cmgtSaftyTrainingProjectDto ) );
        }

        return list;
    }

    @Override
    public List<CmgtSaftyTrainingProjectDto> toDto(List<CmgtSaftyTrainingProject> entityList) {
        if ( entityList == null ) {
            return null;
        }

        List<CmgtSaftyTrainingProjectDto> list = new ArrayList<CmgtSaftyTrainingProjectDto>( entityList.size() );
        for ( CmgtSaftyTrainingProject cmgtSaftyTrainingProject : entityList ) {
            list.add( toDto( cmgtSaftyTrainingProject ) );
        }

        return list;
    }
}
