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

import com.artfess.manage.safty.manager.dto.CmgtSaftyTrainingRecordDto;
import com.artfess.manage.safty.model.CmgtSaftyTrainingRecord;
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:56+0800",
    comments = "version: 1.2.0.Final, compiler: javac, environment: Java 1.8.0_71 (Oracle Corporation)"
)
@Component
public class CmgtSaftyTrainingRecordDtoMapperImpl implements CmgtSaftyTrainingRecordDtoMapper {

    @Override
    public CmgtSaftyTrainingRecord toEntity(CmgtSaftyTrainingRecordDto dto) {
        if ( dto == null ) {
            return null;
        }

        CmgtSaftyTrainingRecord cmgtSaftyTrainingRecord = new CmgtSaftyTrainingRecord();

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

        return cmgtSaftyTrainingRecord;
    }

    @Override
    public CmgtSaftyTrainingRecordDto toDto(CmgtSaftyTrainingRecord entity) {
        if ( entity == null ) {
            return null;
        }

        CmgtSaftyTrainingRecordDto cmgtSaftyTrainingRecordDto = new CmgtSaftyTrainingRecordDto();

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

        return cmgtSaftyTrainingRecordDto;
    }

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

        List<CmgtSaftyTrainingRecord> list = new ArrayList<CmgtSaftyTrainingRecord>( dtoList.size() );
        for ( CmgtSaftyTrainingRecordDto cmgtSaftyTrainingRecordDto : dtoList ) {
            list.add( toEntity( cmgtSaftyTrainingRecordDto ) );
        }

        return list;
    }

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

        List<CmgtSaftyTrainingRecordDto> list = new ArrayList<CmgtSaftyTrainingRecordDto>( entityList.size() );
        for ( CmgtSaftyTrainingRecord cmgtSaftyTrainingRecord : entityList ) {
            list.add( toDto( cmgtSaftyTrainingRecord ) );
        }

        return list;
    }
}
