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

import com.qsoft.rs.sincoar.dto.TcustbalancePKDTO;
import com.qsoft.rs.sincoar.model.TcustbalancePK;
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 TcustbalancePKMapperImpl implements TcustbalancePKMapper {

    @Override
    public TcustbalancePK getEntidad(TcustbalancePKDTO tcustbalancePK) {
        if ( tcustbalancePK == null ) {
            return null;
        }

        TcustbalancePK tcustbalancePK1 = new TcustbalancePK();

        if ( tcustbalancePK.getPersoncode() != null ) {
            tcustbalancePK1.setPersoncode( tcustbalancePK.getPersoncode() );
        }
        tcustbalancePK1.setBalancedate( tcustbalancePK.getBalancedate() );

        return tcustbalancePK1;
    }

    @Override
    public TcustbalancePKDTO getDto(TcustbalancePK tcustbalancePK) {
        if ( tcustbalancePK == null ) {
            return null;
        }

        TcustbalancePKDTO tcustbalancePKDTO = new TcustbalancePKDTO();

        tcustbalancePKDTO.setPersoncode( (int) tcustbalancePK.getPersoncode() );
        tcustbalancePKDTO.setBalancedate( tcustbalancePK.getBalancedate() );

        return tcustbalancePKDTO;
    }
}
