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

import com.qsoft.rs.sincoar.dto.TgenebalancegroupDTO;
import com.qsoft.rs.sincoar.model.Tgenebalancegroup;
import java.math.BigInteger;
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 TgenebalancegroupMapperImpl implements TgenebalancegroupMapper {

    @Override
    public Tgenebalancegroup getEntidad(TgenebalancegroupDTO tgenebalancegroup) {
        if ( tgenebalancegroup == null ) {
            return null;
        }

        Tgenebalancegroup tgenebalancegroup1 = new Tgenebalancegroup();

        tgenebalancegroup1.setBalancegroup( tgenebalancegroup.getBalancegroup() );
        if ( tgenebalancegroup.getRecordversion() != null ) {
            tgenebalancegroup1.setRecordversion( BigInteger.valueOf( tgenebalancegroup.getRecordversion() ) );
        }
        tgenebalancegroup1.setIsadd( tgenebalancegroup.getIsadd() );
        tgenebalancegroup1.setDescription( tgenebalancegroup.getDescription() );
        tgenebalancegroup1.setOpposite( tgenebalancegroup.getOpposite() );

        return tgenebalancegroup1;
    }

    @Override
    public TgenebalancegroupDTO getDto(Tgenebalancegroup tgenebalancegroup) {
        if ( tgenebalancegroup == null ) {
            return null;
        }

        TgenebalancegroupDTO tgenebalancegroupDTO = new TgenebalancegroupDTO();

        tgenebalancegroupDTO.setBalancegroup( tgenebalancegroup.getBalancegroup() );
        if ( tgenebalancegroup.getRecordversion() != null ) {
            tgenebalancegroupDTO.setRecordversion( tgenebalancegroup.getRecordversion().intValue() );
        }
        tgenebalancegroupDTO.setIsadd( tgenebalancegroup.getIsadd() );
        tgenebalancegroupDTO.setDescription( tgenebalancegroup.getDescription() );
        tgenebalancegroupDTO.setOpposite( tgenebalancegroup.getOpposite() );

        return tgenebalancegroupDTO;
    }
}
