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

import com.artfess.manage.base.manager.dto.CmgtBasePositionDto;
import com.artfess.manage.base.model.CmgtBasePosition;
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 CmgtBasePositionDtoMapperImpl implements CmgtBasePositionDtoMapper {

    @Override
    public CmgtBasePosition toEntity(CmgtBasePositionDto dto) {
        if ( dto == null ) {
            return null;
        }

        CmgtBasePosition cmgtBasePosition = new CmgtBasePosition();

        cmgtBasePosition.setCreateBy( dto.getCreateBy() );
        cmgtBasePosition.setCreateOrgId( dto.getCreateOrgId() );
        cmgtBasePosition.setCreateTime( dto.getCreateTime() );
        cmgtBasePosition.setUpdateBy( dto.getUpdateBy() );
        cmgtBasePosition.setUpdateTime( dto.getUpdateTime() );
        cmgtBasePosition.setIsDelete( dto.getIsDelete() );
        cmgtBasePosition.setVersion( dto.getVersion() );
        cmgtBasePosition.setLastTime( dto.getLastTime() );
        cmgtBasePosition.setId( dto.getId() );
        cmgtBasePosition.setCode( dto.getCode() );
        cmgtBasePosition.setName( dto.getName() );
        cmgtBasePosition.setAlias( dto.getAlias() );
        cmgtBasePosition.setDtype( dto.getDtype() );
        cmgtBasePosition.setRid( dto.getRid() );
        cmgtBasePosition.setLatitude( dto.getLatitude() );
        cmgtBasePosition.setLongitude( dto.getLongitude() );
        cmgtBasePosition.setLocation( dto.getLocation() );
        cmgtBasePosition.setSn( dto.getSn() );
        cmgtBasePosition.setReceiveTime( dto.getReceiveTime() );
        cmgtBasePosition.setMemo( dto.getMemo() );

        return cmgtBasePosition;
    }

    @Override
    public CmgtBasePositionDto toDto(CmgtBasePosition entity) {
        if ( entity == null ) {
            return null;
        }

        CmgtBasePositionDto cmgtBasePositionDto = new CmgtBasePositionDto();

        cmgtBasePositionDto.setCreateBy( entity.getCreateBy() );
        cmgtBasePositionDto.setCreateOrgId( entity.getCreateOrgId() );
        cmgtBasePositionDto.setCreateTime( entity.getCreateTime() );
        cmgtBasePositionDto.setUpdateBy( entity.getUpdateBy() );
        cmgtBasePositionDto.setUpdateTime( entity.getUpdateTime() );
        cmgtBasePositionDto.setIsDelete( entity.getIsDelete() );
        cmgtBasePositionDto.setVersion( entity.getVersion() );
        cmgtBasePositionDto.setLastTime( entity.getLastTime() );
        cmgtBasePositionDto.setId( entity.getId() );
        cmgtBasePositionDto.setCode( entity.getCode() );
        cmgtBasePositionDto.setName( entity.getName() );
        cmgtBasePositionDto.setAlias( entity.getAlias() );
        cmgtBasePositionDto.setDtype( entity.getDtype() );
        cmgtBasePositionDto.setRid( entity.getRid() );
        cmgtBasePositionDto.setLatitude( entity.getLatitude() );
        cmgtBasePositionDto.setLongitude( entity.getLongitude() );
        cmgtBasePositionDto.setLocation( entity.getLocation() );
        cmgtBasePositionDto.setSn( entity.getSn() );
        cmgtBasePositionDto.setReceiveTime( entity.getReceiveTime() );
        cmgtBasePositionDto.setMemo( entity.getMemo() );

        return cmgtBasePositionDto;
    }

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

        List<CmgtBasePosition> list = new ArrayList<CmgtBasePosition>( dtoList.size() );
        for ( CmgtBasePositionDto cmgtBasePositionDto : dtoList ) {
            list.add( toEntity( cmgtBasePositionDto ) );
        }

        return list;
    }

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

        List<CmgtBasePositionDto> list = new ArrayList<CmgtBasePositionDto>( entityList.size() );
        for ( CmgtBasePosition cmgtBasePosition : entityList ) {
            list.add( toDto( cmgtBasePosition ) );
        }

        return list;
    }
}
