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

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

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

    @Override
    public Tgenefiletype getEntidad(TgenefiletypeDTO tgenefiletype) {
        if ( tgenefiletype == null ) {
            return null;
        }

        Tgenefiletype tgenefiletype1 = new Tgenefiletype();

        tgenefiletype1.setFilecode( tgenefiletype.getFilecode() );
        tgenefiletype1.setDescription( tgenefiletype.getDescription() );
        tgenefiletype1.setManaged( tgenefiletype.getManaged() );
        if ( tgenefiletype.getRecordversion() != null ) {
            tgenefiletype1.setRecordversion( BigInteger.valueOf( tgenefiletype.getRecordversion() ) );
        }

        return tgenefiletype1;
    }

    @Override
    public TgenefiletypeDTO getDto(Tgenefiletype tgenefiletype) {
        if ( tgenefiletype == null ) {
            return null;
        }

        TgenefiletypeDTO tgenefiletypeDTO = new TgenefiletypeDTO();

        tgenefiletypeDTO.setFilecode( tgenefiletype.getFilecode() );
        tgenefiletypeDTO.setDescription( tgenefiletype.getDescription() );
        tgenefiletypeDTO.setManaged( tgenefiletype.getManaged() );
        if ( tgenefiletype.getRecordversion() != null ) {
            tgenefiletypeDTO.setRecordversion( tgenefiletype.getRecordversion().intValue() );
        }

        return tgenefiletypeDTO;
    }
}
