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

import com.qsoft.rs.sincoar.dto.TcustpersondetailPKDTO;
import com.qsoft.rs.sincoar.model.TcustpersondetailPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TcustpersondetailPK getEntidad(TcustpersondetailPKDTO tcustpersondetailPK) {
        if ( tcustpersondetailPK == null ) {
            return null;
        }

        TcustpersondetailPK tcustpersondetailPK1 = new TcustpersondetailPK();

        if ( tcustpersondetailPK.getPersoncode() != null ) {
            tcustpersondetailPK1.setPersoncode( tcustpersondetailPK.getPersoncode() );
        }
        tcustpersondetailPK1.setDateto( tcustpersondetailPK.getDateto() );

        return tcustpersondetailPK1;
    }

    @Override
    public TcustpersondetailPKDTO getDto(TcustpersondetailPK tcustpersondetailPK) {
        if ( tcustpersondetailPK == null ) {
            return null;
        }

        TcustpersondetailPKDTO tcustpersondetailPKDTO = new TcustpersondetailPKDTO();

        tcustpersondetailPKDTO.setPersoncode( (int) tcustpersondetailPK.getPersoncode() );
        tcustpersondetailPKDTO.setDateto( tcustpersondetailPK.getDateto() );

        return tcustpersondetailPKDTO;
    }
}
