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

import com.qsoft.rs.sincoar.dto.TcustcompanyproviderPKDTO;
import com.qsoft.rs.sincoar.model.TcustcompanyproviderPK;
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 TcustcompanyproviderPKMapperImpl implements TcustcompanyproviderPKMapper {

    @Override
    public TcustcompanyproviderPK getEntidad(TcustcompanyproviderPKDTO tcustcompanyproviderPK) {
        if ( tcustcompanyproviderPK == null ) {
            return null;
        }

        TcustcompanyproviderPK tcustcompanyproviderPK1 = new TcustcompanyproviderPK();

        if ( tcustcompanyproviderPK.getPersoncode() != null ) {
            tcustcompanyproviderPK1.setPersoncode( tcustcompanyproviderPK.getPersoncode() );
        }
        tcustcompanyproviderPK1.setDateto( tcustcompanyproviderPK.getDateto() );
        if ( tcustcompanyproviderPK.getProvidersequence() != null ) {
            tcustcompanyproviderPK1.setProvidersequence( tcustcompanyproviderPK.getProvidersequence().shortValue() );
        }

        return tcustcompanyproviderPK1;
    }

    @Override
    public TcustcompanyproviderPKDTO getDto(TcustcompanyproviderPK tcustcompanyproviderPK) {
        if ( tcustcompanyproviderPK == null ) {
            return null;
        }

        TcustcompanyproviderPKDTO tcustcompanyproviderPKDTO = new TcustcompanyproviderPKDTO();

        tcustcompanyproviderPKDTO.setPersoncode( (int) tcustcompanyproviderPK.getPersoncode() );
        tcustcompanyproviderPKDTO.setDateto( tcustcompanyproviderPK.getDateto() );
        tcustcompanyproviderPKDTO.setProvidersequence( (int) tcustcompanyproviderPK.getProvidersequence() );

        return tcustcompanyproviderPKDTO;
    }
}
