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

import com.qsoft.rs.sincoar.dto.TcusteconomicgroupPKDTO;
import com.qsoft.rs.sincoar.model.TcusteconomicgroupPK;
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 TcusteconomicgroupPKMapperImpl implements TcusteconomicgroupPKMapper {

    @Override
    public TcusteconomicgroupPK getEntidad(TcusteconomicgroupPKDTO tcusteconomicgroupPK) {
        if ( tcusteconomicgroupPK == null ) {
            return null;
        }

        TcusteconomicgroupPK tcusteconomicgroupPK1 = new TcusteconomicgroupPK();

        if ( tcusteconomicgroupPK.getGrouppersoncode() != null ) {
            tcusteconomicgroupPK1.setGrouppersoncode( tcusteconomicgroupPK.getGrouppersoncode() );
        }
        if ( tcusteconomicgroupPK.getPersoncode() != null ) {
            tcusteconomicgroupPK1.setPersoncode( tcusteconomicgroupPK.getPersoncode() );
        }
        if ( tcusteconomicgroupPK.getCompanycode() != null ) {
            tcusteconomicgroupPK1.setCompanycode( tcusteconomicgroupPK.getCompanycode() );
        }

        return tcusteconomicgroupPK1;
    }

    @Override
    public TcusteconomicgroupPKDTO getDto(TcusteconomicgroupPK tcusteconomicgroupPK) {
        if ( tcusteconomicgroupPK == null ) {
            return null;
        }

        TcusteconomicgroupPKDTO tcusteconomicgroupPKDTO = new TcusteconomicgroupPKDTO();

        tcusteconomicgroupPKDTO.setGrouppersoncode( (int) tcusteconomicgroupPK.getGrouppersoncode() );
        tcusteconomicgroupPKDTO.setPersoncode( (int) tcusteconomicgroupPK.getPersoncode() );
        tcusteconomicgroupPKDTO.setCompanycode( (int) tcusteconomicgroupPK.getCompanycode() );

        return tcusteconomicgroupPKDTO;
    }
}
