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

import com.qsoft.rs.sincoar.dto.TcustpersonbalancePKDTO;
import com.qsoft.rs.sincoar.model.TcustpersonbalancePK;
import javax.annotation.processing.Generated;

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

    @Override
    public TcustpersonbalancePK getEntidad(TcustpersonbalancePKDTO tcustpersonbalancePK) {
        if ( tcustpersonbalancePK == null ) {
            return null;
        }

        TcustpersonbalancePK tcustpersonbalancePK1 = new TcustpersonbalancePK();

        if ( tcustpersonbalancePK.getPersoncode() != null ) {
            tcustpersonbalancePK1.setPersoncode( tcustpersonbalancePK.getPersoncode() );
        }
        tcustpersonbalancePK1.setBalancedate( tcustpersonbalancePK.getBalancedate() );
        tcustpersonbalancePK1.setBalancecatalog( tcustpersonbalancePK.getBalancecatalog() );
        tcustpersonbalancePK1.setBalancecatalogcode( tcustpersonbalancePK.getBalancecatalogcode() );
        tcustpersonbalancePK1.setDateto( tcustpersonbalancePK.getDateto() );

        return tcustpersonbalancePK1;
    }

    @Override
    public TcustpersonbalancePKDTO getDto(TcustpersonbalancePK tcustpersonbalancePK) {
        if ( tcustpersonbalancePK == null ) {
            return null;
        }

        TcustpersonbalancePKDTO tcustpersonbalancePKDTO = new TcustpersonbalancePKDTO();

        tcustpersonbalancePKDTO.setPersoncode( (int) tcustpersonbalancePK.getPersoncode() );
        tcustpersonbalancePKDTO.setBalancedate( tcustpersonbalancePK.getBalancedate() );
        tcustpersonbalancePKDTO.setBalancecatalog( tcustpersonbalancePK.getBalancecatalog() );
        tcustpersonbalancePKDTO.setBalancecatalogcode( tcustpersonbalancePK.getBalancecatalogcode() );
        tcustpersonbalancePKDTO.setDateto( tcustpersonbalancePK.getDateto() );

        return tcustpersonbalancePKDTO;
    }
}
