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

import com.qsoft.rs.sincoar.dto.TcustpersonphonePKDTO;
import com.qsoft.rs.sincoar.model.TcustpersonphonePK;
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 TcustpersonphonePKMapperImpl implements TcustpersonphonePKMapper {

    @Override
    public TcustpersonphonePK getEntidad(TcustpersonphonePKDTO tcustpersonphonePK) {
        if ( tcustpersonphonePK == null ) {
            return null;
        }

        TcustpersonphonePK tcustpersonphonePK1 = new TcustpersonphonePK();

        if ( tcustpersonphonePK.getPersoncode() != null ) {
            tcustpersonphonePK1.setPersoncode( tcustpersonphonePK.getPersoncode() );
        }
        if ( tcustpersonphonePK.getPhonesequence() != null ) {
            tcustpersonphonePK1.setPhonesequence( tcustpersonphonePK.getPhonesequence().shortValue() );
        }
        tcustpersonphonePK1.setDateto( tcustpersonphonePK.getDateto() );

        return tcustpersonphonePK1;
    }

    @Override
    public TcustpersonphonePKDTO getDto(TcustpersonphonePK tcustpersonphonePK) {
        if ( tcustpersonphonePK == null ) {
            return null;
        }

        TcustpersonphonePKDTO tcustpersonphonePKDTO = new TcustpersonphonePKDTO();

        tcustpersonphonePKDTO.setPersoncode( (int) tcustpersonphonePK.getPersoncode() );
        tcustpersonphonePKDTO.setPhonesequence( (int) tcustpersonphonePK.getPhonesequence() );
        tcustpersonphonePKDTO.setDateto( tcustpersonphonePK.getDateto() );

        return tcustpersonphonePKDTO;
    }
}
