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

import com.artfess.manage.safty.manager.dto.CmgtSaftyTrainingPlanDto;
import com.artfess.manage.safty.model.CmgtSaftyTrainingPlan;
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 CmgtSaftyTrainingPlanMapperImpl implements CmgtSaftyTrainingPlanMapper {

    @Override
    public CmgtSaftyTrainingPlan toEntity(CmgtSaftyTrainingPlanDto dto) {
        if ( dto == null ) {
            return null;
        }

        CmgtSaftyTrainingPlan cmgtSaftyTrainingPlan = new CmgtSaftyTrainingPlan();

        cmgtSaftyTrainingPlan.setCreateBy( dto.getCreateBy() );
        cmgtSaftyTrainingPlan.setCreateOrgId( dto.getCreateOrgId() );
        cmgtSaftyTrainingPlan.setCreateTime( dto.getCreateTime() );
        cmgtSaftyTrainingPlan.setUpdateBy( dto.getUpdateBy() );
        cmgtSaftyTrainingPlan.setUpdateTime( dto.getUpdateTime() );
        cmgtSaftyTrainingPlan.setIsDelete( dto.getIsDelete() );
        cmgtSaftyTrainingPlan.setVersion( dto.getVersion() );
        cmgtSaftyTrainingPlan.setLastTime( dto.getLastTime() );
        cmgtSaftyTrainingPlan.setId( dto.getId() );
        cmgtSaftyTrainingPlan.setTrainingDate( dto.getTrainingDate() );
        cmgtSaftyTrainingPlan.setTrainingProjectId( dto.getTrainingProjectId() );
        cmgtSaftyTrainingPlan.setLocation( dto.getLocation() );
        cmgtSaftyTrainingPlan.setTrainee( dto.getTrainee() );
        cmgtSaftyTrainingPlan.setTeacher( dto.getTeacher() );
        cmgtSaftyTrainingPlan.setContent( dto.getContent() );
        cmgtSaftyTrainingPlan.setSn( dto.getSn() );
        cmgtSaftyTrainingPlan.setMemo( dto.getMemo() );

        return cmgtSaftyTrainingPlan;
    }

    @Override
    public CmgtSaftyTrainingPlanDto toDto(CmgtSaftyTrainingPlan entity) {
        if ( entity == null ) {
            return null;
        }

        CmgtSaftyTrainingPlanDto cmgtSaftyTrainingPlanDto = new CmgtSaftyTrainingPlanDto();

        cmgtSaftyTrainingPlanDto.setCreateBy( entity.getCreateBy() );
        cmgtSaftyTrainingPlanDto.setCreateOrgId( entity.getCreateOrgId() );
        cmgtSaftyTrainingPlanDto.setCreateTime( entity.getCreateTime() );
        cmgtSaftyTrainingPlanDto.setUpdateBy( entity.getUpdateBy() );
        cmgtSaftyTrainingPlanDto.setUpdateTime( entity.getUpdateTime() );
        cmgtSaftyTrainingPlanDto.setIsDelete( entity.getIsDelete() );
        cmgtSaftyTrainingPlanDto.setVersion( entity.getVersion() );
        cmgtSaftyTrainingPlanDto.setLastTime( entity.getLastTime() );
        cmgtSaftyTrainingPlanDto.setId( entity.getId() );
        cmgtSaftyTrainingPlanDto.setTrainingDate( entity.getTrainingDate() );
        cmgtSaftyTrainingPlanDto.setTrainingProjectId( entity.getTrainingProjectId() );
        cmgtSaftyTrainingPlanDto.setLocation( entity.getLocation() );
        cmgtSaftyTrainingPlanDto.setTrainee( entity.getTrainee() );
        cmgtSaftyTrainingPlanDto.setTeacher( entity.getTeacher() );
        cmgtSaftyTrainingPlanDto.setContent( entity.getContent() );
        cmgtSaftyTrainingPlanDto.setSn( entity.getSn() );
        cmgtSaftyTrainingPlanDto.setMemo( entity.getMemo() );

        return cmgtSaftyTrainingPlanDto;
    }

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

        List<CmgtSaftyTrainingPlan> list = new ArrayList<CmgtSaftyTrainingPlan>( dtoList.size() );
        for ( CmgtSaftyTrainingPlanDto cmgtSaftyTrainingPlanDto : dtoList ) {
            list.add( toEntity( cmgtSaftyTrainingPlanDto ) );
        }

        return list;
    }

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

        List<CmgtSaftyTrainingPlanDto> list = new ArrayList<CmgtSaftyTrainingPlanDto>( entityList.size() );
        for ( CmgtSaftyTrainingPlan cmgtSaftyTrainingPlan : entityList ) {
            list.add( toDto( cmgtSaftyTrainingPlan ) );
        }

        return list;
    }
}
