package com.qsoft.rs.sincoar.dominio.mapper;

import com.qsoft.rs.sincoar.dto.TbpmgroupsPKDTO;
import com.qsoft.rs.sincoar.model.TbpmgroupsPK;
import javax.annotation.processing.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2022-09-02T16:14:49-0500",
    comments = "version: 1.5.2.Final, compiler: javac, environment: Java 17.0.4 (Private Build)"
)
public class TbpmgroupsPKMapperImpl implements TbpmgroupsPKMapper {

    @Override
    public TbpmgroupsPK getEntidad(TbpmgroupsPKDTO tbpmgroupsPK) {
        if ( tbpmgroupsPK == null ) {
            return null;
        }

        TbpmgroupsPK tbpmgroupsPK1 = new TbpmgroupsPK();

        tbpmgroupsPK1.setGroupcode( tbpmgroupsPK.getGroupcode() );
        if ( tbpmgroupsPK.getCompanycode() != null ) {
            tbpmgroupsPK1.setCompanycode( tbpmgroupsPK.getCompanycode() );
        }

        return tbpmgroupsPK1;
    }

    @Override
    public TbpmgroupsPKDTO getDto(TbpmgroupsPK tbpmgroupsPK) {
        if ( tbpmgroupsPK == null ) {
            return null;
        }

        TbpmgroupsPKDTO tbpmgroupsPKDTO = new TbpmgroupsPKDTO();

        tbpmgroupsPKDTO.setGroupcode( tbpmgroupsPK.getGroupcode() );
        tbpmgroupsPKDTO.setCompanycode( (int) tbpmgroupsPK.getCompanycode() );

        return tbpmgroupsPKDTO;
    }
}
