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

import com.qsoft.rs.sincoar.dto.TcustpeopleloanPKDTO;
import com.qsoft.rs.sincoar.model.TcustpeopleloanPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TcustpeopleloanPK getEntidad(TcustpeopleloanPKDTO tcustpeopleloanPK) {
        if ( tcustpeopleloanPK == null ) {
            return null;
        }

        TcustpeopleloanPK tcustpeopleloanPK1 = new TcustpeopleloanPK();

        if ( tcustpeopleloanPK.getPersoncode() != null ) {
            tcustpeopleloanPK1.setPersoncode( tcustpeopleloanPK.getPersoncode() );
        }
        tcustpeopleloanPK1.setDateto( tcustpeopleloanPK.getDateto() );
        if ( tcustpeopleloanPK.getLoansequence() != null ) {
            tcustpeopleloanPK1.setLoansequence( tcustpeopleloanPK.getLoansequence().shortValue() );
        }

        return tcustpeopleloanPK1;
    }

    @Override
    public TcustpeopleloanPKDTO getDto(TcustpeopleloanPK tcustpeopleloanPK) {
        if ( tcustpeopleloanPK == null ) {
            return null;
        }

        TcustpeopleloanPKDTO tcustpeopleloanPKDTO = new TcustpeopleloanPKDTO();

        tcustpeopleloanPKDTO.setPersoncode( (int) tcustpeopleloanPK.getPersoncode() );
        tcustpeopleloanPKDTO.setDateto( tcustpeopleloanPK.getDateto() );
        tcustpeopleloanPKDTO.setLoansequence( (int) tcustpeopleloanPK.getLoansequence() );

        return tcustpeopleloanPKDTO;
    }
}
