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

import com.qsoft.rs.sincoar.dto.TgenefunctionsDTO;
import com.qsoft.rs.sincoar.model.Tgenefunctions;
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 TgenefunctionsMapperImpl implements TgenefunctionsMapper {

    @Override
    public Tgenefunctions getEntidad(TgenefunctionsDTO tgenefunctions) {
        if ( tgenefunctions == null ) {
            return null;
        }

        Tgenefunctions tgenefunctions1 = new Tgenefunctions();

        tgenefunctions1.setName( tgenefunctions.getName() );
        tgenefunctions1.setClassname( tgenefunctions.getClassname() );
        tgenefunctions1.setActive( tgenefunctions.getActive() );
        if ( tgenefunctions.getRecordversion() != null ) {
            tgenefunctions1.setRecordversion( BigInteger.valueOf( tgenefunctions.getRecordversion() ) );
        }
        tgenefunctions1.setDescription( tgenefunctions.getDescription() );

        return tgenefunctions1;
    }

    @Override
    public TgenefunctionsDTO getDto(Tgenefunctions tgenefunctions) {
        if ( tgenefunctions == null ) {
            return null;
        }

        TgenefunctionsDTO tgenefunctionsDTO = new TgenefunctionsDTO();

        tgenefunctionsDTO.setName( tgenefunctions.getName() );
        tgenefunctionsDTO.setClassname( tgenefunctions.getClassname() );
        tgenefunctionsDTO.setActive( tgenefunctions.getActive() );
        if ( tgenefunctions.getRecordversion() != null ) {
            tgenefunctionsDTO.setRecordversion( tgenefunctions.getRecordversion().intValue() );
        }
        tgenefunctionsDTO.setDescription( tgenefunctions.getDescription() );

        return tgenefunctionsDTO;
    }
}
