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

import com.qsoft.rs.sincoar.dto.TcustcompanyfinancialPKDTO;
import com.qsoft.rs.sincoar.model.TcustcompanyfinancialPK;
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 TcustcompanyfinancialPKMapperImpl implements TcustcompanyfinancialPKMapper {

    @Override
    public TcustcompanyfinancialPK getEntidad(TcustcompanyfinancialPKDTO tcustcompanyfinancialPK) {
        if ( tcustcompanyfinancialPK == null ) {
            return null;
        }

        TcustcompanyfinancialPK tcustcompanyfinancialPK1 = new TcustcompanyfinancialPK();

        if ( tcustcompanyfinancialPK.getPersoncode() != null ) {
            tcustcompanyfinancialPK1.setPersoncode( tcustcompanyfinancialPK.getPersoncode() );
        }
        tcustcompanyfinancialPK1.setDateto( tcustcompanyfinancialPK.getDateto() );

        return tcustcompanyfinancialPK1;
    }

    @Override
    public TcustcompanyfinancialPKDTO getDto(TcustcompanyfinancialPK tcustcompanyfinancialPK) {
        if ( tcustcompanyfinancialPK == null ) {
            return null;
        }

        TcustcompanyfinancialPKDTO tcustcompanyfinancialPKDTO = new TcustcompanyfinancialPKDTO();

        tcustcompanyfinancialPKDTO.setPersoncode( (int) tcustcompanyfinancialPK.getPersoncode() );
        tcustcompanyfinancialPKDTO.setDateto( tcustcompanyfinancialPK.getDateto() );

        return tcustcompanyfinancialPKDTO;
    }
}
