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

import com.qsoft.rs.sincoar.dto.TcustcompanyclientPKDTO;
import com.qsoft.rs.sincoar.model.TcustcompanyclientPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TcustcompanyclientPK getEntidad(TcustcompanyclientPKDTO tcustcompanyclientPK) {
        if ( tcustcompanyclientPK == null ) {
            return null;
        }

        TcustcompanyclientPK tcustcompanyclientPK1 = new TcustcompanyclientPK();

        if ( tcustcompanyclientPK.getPersoncode() != null ) {
            tcustcompanyclientPK1.setPersoncode( tcustcompanyclientPK.getPersoncode() );
        }
        tcustcompanyclientPK1.setDateto( tcustcompanyclientPK.getDateto() );
        if ( tcustcompanyclientPK.getClientsequence() != null ) {
            tcustcompanyclientPK1.setClientsequence( tcustcompanyclientPK.getClientsequence().shortValue() );
        }

        return tcustcompanyclientPK1;
    }

    @Override
    public TcustcompanyclientPKDTO getDto(TcustcompanyclientPK tcustcompanyclientPK) {
        if ( tcustcompanyclientPK == null ) {
            return null;
        }

        TcustcompanyclientPKDTO tcustcompanyclientPKDTO = new TcustcompanyclientPKDTO();

        tcustcompanyclientPKDTO.setPersoncode( (int) tcustcompanyclientPK.getPersoncode() );
        tcustcompanyclientPKDTO.setDateto( tcustcompanyclientPK.getDateto() );
        tcustcompanyclientPKDTO.setClientsequence( (int) tcustcompanyclientPK.getClientsequence() );

        return tcustcompanyclientPKDTO;
    }
}
