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

import com.qsoft.rs.sincoar.dto.TcustbalancefinancialPKDTO;
import com.qsoft.rs.sincoar.model.TcustbalancefinancialPK;
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 TcustbalancefinancialPKMapperImpl implements TcustbalancefinancialPKMapper {

    @Override
    public TcustbalancefinancialPK getEntidad(TcustbalancefinancialPKDTO tcustbalancefinancialPK) {
        if ( tcustbalancefinancialPK == null ) {
            return null;
        }

        TcustbalancefinancialPK tcustbalancefinancialPK1 = new TcustbalancefinancialPK();

        if ( tcustbalancefinancialPK.getPersoncode() != null ) {
            tcustbalancefinancialPK1.setPersoncode( tcustbalancefinancialPK.getPersoncode() );
        }
        tcustbalancefinancialPK1.setBalancedate( tcustbalancefinancialPK.getBalancedate() );
        tcustbalancefinancialPK1.setAccountcode( tcustbalancefinancialPK.getAccountcode() );
        tcustbalancefinancialPK1.setBalancecatalog( tcustbalancefinancialPK.getBalancecatalog() );
        tcustbalancefinancialPK1.setBalancecatalogcode( tcustbalancefinancialPK.getBalancecatalogcode() );
        tcustbalancefinancialPK1.setDateto( tcustbalancefinancialPK.getDateto() );

        return tcustbalancefinancialPK1;
    }

    @Override
    public TcustbalancefinancialPKDTO getDto(TcustbalancefinancialPK tcustbalancefinancialPK) {
        if ( tcustbalancefinancialPK == null ) {
            return null;
        }

        TcustbalancefinancialPKDTO tcustbalancefinancialPKDTO = new TcustbalancefinancialPKDTO();

        tcustbalancefinancialPKDTO.setPersoncode( (int) tcustbalancefinancialPK.getPersoncode() );
        tcustbalancefinancialPKDTO.setBalancedate( tcustbalancefinancialPK.getBalancedate() );
        tcustbalancefinancialPKDTO.setAccountcode( tcustbalancefinancialPK.getAccountcode() );
        tcustbalancefinancialPKDTO.setBalancecatalog( tcustbalancefinancialPK.getBalancecatalog() );
        tcustbalancefinancialPKDTO.setBalancecatalogcode( tcustbalancefinancialPK.getBalancecatalogcode() );
        tcustbalancefinancialPKDTO.setDateto( tcustbalancefinancialPK.getDateto() );

        return tcustbalancefinancialPKDTO;
    }
}
