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

import com.qsoft.rs.sincoar.dto.TgenecatalogtestDTO;
import com.qsoft.rs.sincoar.model.Tgenecatalogtest;
import java.math.BigInteger;
import javax.annotation.processing.Generated;

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

    @Override
    public Tgenecatalogtest getEntidad(TgenecatalogtestDTO tgenecatalogtest) {
        if ( tgenecatalogtest == null ) {
            return null;
        }

        Tgenecatalogtest tgenecatalogtest1 = new Tgenecatalogtest();

        tgenecatalogtest1.setCatalogcode( tgenecatalogtest.getCatalogcode() );
        if ( tgenecatalogtest.getRecordversion() != null ) {
            tgenecatalogtest1.setRecordversion( BigInteger.valueOf( tgenecatalogtest.getRecordversion() ) );
        }
        tgenecatalogtest1.setDescription( tgenecatalogtest.getDescription() );
        tgenecatalogtest1.setIdalfresco( tgenecatalogtest.getIdalfresco() );

        return tgenecatalogtest1;
    }

    @Override
    public TgenecatalogtestDTO getDto(Tgenecatalogtest tgenecatalogtest) {
        if ( tgenecatalogtest == null ) {
            return null;
        }

        TgenecatalogtestDTO tgenecatalogtestDTO = new TgenecatalogtestDTO();

        tgenecatalogtestDTO.setCatalogcode( tgenecatalogtest.getCatalogcode() );
        if ( tgenecatalogtest.getRecordversion() != null ) {
            tgenecatalogtestDTO.setRecordversion( tgenecatalogtest.getRecordversion().intValue() );
        }
        tgenecatalogtestDTO.setDescription( tgenecatalogtest.getDescription() );
        tgenecatalogtestDTO.setIdalfresco( tgenecatalogtest.getIdalfresco() );

        return tgenecatalogtestDTO;
    }
}
