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

import com.qsoft.rs.sincoar.dto.TcustpeoplejobPKDTO;
import com.qsoft.rs.sincoar.model.TcustpeoplejobPK;
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 TcustpeoplejobPKMapperImpl implements TcustpeoplejobPKMapper {

    @Override
    public TcustpeoplejobPK getEntidad(TcustpeoplejobPKDTO tcustpeoplejobPK) {
        if ( tcustpeoplejobPK == null ) {
            return null;
        }

        TcustpeoplejobPK tcustpeoplejobPK1 = new TcustpeoplejobPK();

        if ( tcustpeoplejobPK.getPersoncode() != null ) {
            tcustpeoplejobPK1.setPersoncode( tcustpeoplejobPK.getPersoncode() );
        }
        tcustpeoplejobPK1.setDateto( tcustpeoplejobPK.getDateto() );
        if ( tcustpeoplejobPK.getJobsequence() != null ) {
            tcustpeoplejobPK1.setJobsequence( tcustpeoplejobPK.getJobsequence().shortValue() );
        }

        return tcustpeoplejobPK1;
    }

    @Override
    public TcustpeoplejobPKDTO getDto(TcustpeoplejobPK tcustpeoplejobPK) {
        if ( tcustpeoplejobPK == null ) {
            return null;
        }

        TcustpeoplejobPKDTO tcustpeoplejobPKDTO = new TcustpeoplejobPKDTO();

        tcustpeoplejobPKDTO.setPersoncode( (int) tcustpeoplejobPK.getPersoncode() );
        tcustpeoplejobPKDTO.setDateto( tcustpeoplejobPK.getDateto() );
        tcustpeoplejobPKDTO.setJobsequence( (int) tcustpeoplejobPK.getJobsequence() );

        return tcustpeoplejobPKDTO;
    }
}
