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

import com.qsoft.rs.sincoar.dto.TcustcompanymanagersPKDTO;
import com.qsoft.rs.sincoar.model.TcustcompanymanagersPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TcustcompanymanagersPK getEntidad(TcustcompanymanagersPKDTO tcustcompanymanagersPK) {
        if ( tcustcompanymanagersPK == null ) {
            return null;
        }

        TcustcompanymanagersPK tcustcompanymanagersPK1 = new TcustcompanymanagersPK();

        if ( tcustcompanymanagersPK.getPersoncode() != null ) {
            tcustcompanymanagersPK1.setPersoncode( tcustcompanymanagersPK.getPersoncode() );
        }
        tcustcompanymanagersPK1.setDateto( tcustcompanymanagersPK.getDateto() );
        if ( tcustcompanymanagersPK.getManagerpersoncode() != null ) {
            tcustcompanymanagersPK1.setManagerpersoncode( tcustcompanymanagersPK.getManagerpersoncode() );
        }
        tcustcompanymanagersPK1.setAppointmentcatalog( tcustcompanymanagersPK.getAppointmentcatalog() );
        tcustcompanymanagersPK1.setAppointmentcatalogcode( tcustcompanymanagersPK.getAppointmentcatalogcode() );

        return tcustcompanymanagersPK1;
    }

    @Override
    public TcustcompanymanagersPKDTO getDto(TcustcompanymanagersPK tcustcompanymanagersPK) {
        if ( tcustcompanymanagersPK == null ) {
            return null;
        }

        TcustcompanymanagersPKDTO tcustcompanymanagersPKDTO = new TcustcompanymanagersPKDTO();

        tcustcompanymanagersPKDTO.setPersoncode( (int) tcustcompanymanagersPK.getPersoncode() );
        tcustcompanymanagersPKDTO.setDateto( tcustcompanymanagersPK.getDateto() );
        tcustcompanymanagersPKDTO.setManagerpersoncode( (int) tcustcompanymanagersPK.getManagerpersoncode() );
        tcustcompanymanagersPKDTO.setAppointmentcatalog( tcustcompanymanagersPK.getAppointmentcatalog() );
        tcustcompanymanagersPKDTO.setAppointmentcatalogcode( tcustcompanymanagersPK.getAppointmentcatalogcode() );

        return tcustcompanymanagersPKDTO;
    }
}
