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

import com.qsoft.rs.sincoar.dto.TcustbalanceaccolevelDTO;
import com.qsoft.rs.sincoar.model.Tcustbalanceaccolevel;
import java.math.BigInteger;
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 TcustbalanceaccolevelMapperImpl implements TcustbalanceaccolevelMapper {

    @Override
    public Tcustbalanceaccolevel getEntidad(TcustbalanceaccolevelDTO tcustbalanceaccolevel) {
        if ( tcustbalanceaccolevel == null ) {
            return null;
        }

        Tcustbalanceaccolevel tcustbalanceaccolevel1 = new Tcustbalanceaccolevel();

        tcustbalanceaccolevel1.setAccolevelcode( tcustbalanceaccolevel.getAccolevelcode() );
        tcustbalanceaccolevel1.setDescription( tcustbalanceaccolevel.getDescription() );
        if ( tcustbalanceaccolevel.getRecordversion() != null ) {
            tcustbalanceaccolevel1.setRecordversion( BigInteger.valueOf( tcustbalanceaccolevel.getRecordversion() ) );
        }

        return tcustbalanceaccolevel1;
    }

    @Override
    public TcustbalanceaccolevelDTO getDto(Tcustbalanceaccolevel tcustbalanceaccolevel) {
        if ( tcustbalanceaccolevel == null ) {
            return null;
        }

        TcustbalanceaccolevelDTO tcustbalanceaccolevelDTO = new TcustbalanceaccolevelDTO();

        tcustbalanceaccolevelDTO.setAccolevelcode( tcustbalanceaccolevel.getAccolevelcode() );
        tcustbalanceaccolevelDTO.setDescription( tcustbalanceaccolevel.getDescription() );
        if ( tcustbalanceaccolevel.getRecordversion() != null ) {
            tcustbalanceaccolevelDTO.setRecordversion( tcustbalanceaccolevel.getRecordversion().intValue() );
        }

        return tcustbalanceaccolevelDTO;
    }
}
