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

import com.qsoft.rs.sincoar.dto.TcustlegallinkPKDTO;
import com.qsoft.rs.sincoar.model.TcustlegallinkPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TcustlegallinkPK getEntidad(TcustlegallinkPKDTO tcustlegallinkPK) {
        if ( tcustlegallinkPK == null ) {
            return null;
        }

        TcustlegallinkPK tcustlegallinkPK1 = new TcustlegallinkPK();

        if ( tcustlegallinkPK.getPersoncode() != null ) {
            tcustlegallinkPK1.setPersoncode( tcustlegallinkPK.getPersoncode() );
        }
        if ( tcustlegallinkPK.getLinkpersoncode() != null ) {
            tcustlegallinkPK1.setLinkpersoncode( tcustlegallinkPK.getLinkpersoncode() );
        }
        if ( tcustlegallinkPK.getCompanycode() != null ) {
            tcustlegallinkPK1.setCompanycode( tcustlegallinkPK.getCompanycode() );
        }
        tcustlegallinkPK1.setDateto( tcustlegallinkPK.getDateto() );

        return tcustlegallinkPK1;
    }

    @Override
    public TcustlegallinkPKDTO getDto(TcustlegallinkPK tcustlegallinkPK) {
        if ( tcustlegallinkPK == null ) {
            return null;
        }

        TcustlegallinkPKDTO tcustlegallinkPKDTO = new TcustlegallinkPKDTO();

        tcustlegallinkPKDTO.setPersoncode( (int) tcustlegallinkPK.getPersoncode() );
        tcustlegallinkPKDTO.setLinkpersoncode( (int) tcustlegallinkPK.getLinkpersoncode() );
        tcustlegallinkPKDTO.setCompanycode( (int) tcustlegallinkPK.getCompanycode() );
        tcustlegallinkPKDTO.setDateto( tcustlegallinkPK.getDateto() );

        return tcustlegallinkPKDTO;
    }
}
