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

import com.qsoft.rs.sincoar.dto.TcustcompanyPKDTO;
import com.qsoft.rs.sincoar.model.TcustcompanyPK;
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 TcustcompanyPKMapperImpl implements TcustcompanyPKMapper {

    @Override
    public TcustcompanyPK getEntidad(TcustcompanyPKDTO tcustcompanyPK) {
        if ( tcustcompanyPK == null ) {
            return null;
        }

        TcustcompanyPK tcustcompanyPK1 = new TcustcompanyPK();

        if ( tcustcompanyPK.getPersoncode() != null ) {
            tcustcompanyPK1.setPersoncode( tcustcompanyPK.getPersoncode() );
        }
        tcustcompanyPK1.setDateto( tcustcompanyPK.getDateto() );

        return tcustcompanyPK1;
    }

    @Override
    public TcustcompanyPKDTO getDto(TcustcompanyPK tcustcompanyPK) {
        if ( tcustcompanyPK == null ) {
            return null;
        }

        TcustcompanyPKDTO tcustcompanyPKDTO = new TcustcompanyPKDTO();

        tcustcompanyPKDTO.setPersoncode( (int) tcustcompanyPK.getPersoncode() );
        tcustcompanyPKDTO.setDateto( tcustcompanyPK.getDateto() );

        return tcustcompanyPKDTO;
    }
}
