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

import com.qsoft.rs.sincoar.dto.TcustfamiliarllinkPKDTO;
import com.qsoft.rs.sincoar.model.TcustfamiliarllinkPK;
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 TcustfamiliarllinkPKMapperImpl implements TcustfamiliarllinkPKMapper {

    @Override
    public TcustfamiliarllinkPK getEntidad(TcustfamiliarllinkPKDTO tcustfamiliarllinkPK) {
        if ( tcustfamiliarllinkPK == null ) {
            return null;
        }

        TcustfamiliarllinkPK tcustfamiliarllinkPK1 = new TcustfamiliarllinkPK();

        if ( tcustfamiliarllinkPK.getPersoncode() != null ) {
            tcustfamiliarllinkPK1.setPersoncode( tcustfamiliarllinkPK.getPersoncode() );
        }
        if ( tcustfamiliarllinkPK.getLinkpersoncode() != null ) {
            tcustfamiliarllinkPK1.setLinkpersoncode( tcustfamiliarllinkPK.getLinkpersoncode() );
        }

        return tcustfamiliarllinkPK1;
    }

    @Override
    public TcustfamiliarllinkPKDTO getDto(TcustfamiliarllinkPK tcustfamiliarllinkPK) {
        if ( tcustfamiliarllinkPK == null ) {
            return null;
        }

        TcustfamiliarllinkPKDTO tcustfamiliarllinkPKDTO = new TcustfamiliarllinkPKDTO();

        tcustfamiliarllinkPKDTO.setPersoncode( (int) tcustfamiliarllinkPK.getPersoncode() );
        tcustfamiliarllinkPKDTO.setLinkpersoncode( (int) tcustfamiliarllinkPK.getLinkpersoncode() );

        return tcustfamiliarllinkPKDTO;
    }
}
