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

import com.qsoft.rs.sincoar.dto.TgenechannelsDTO;
import com.qsoft.rs.sincoar.model.Tgenechannels;
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 TgenechannelsMapperImpl implements TgenechannelsMapper {

    @Override
    public Tgenechannels getEntidad(TgenechannelsDTO tgenechannels) {
        if ( tgenechannels == null ) {
            return null;
        }

        Tgenechannels tgenechannels1 = new Tgenechannels();

        tgenechannels1.setChannelcode( tgenechannels.getChannelcode() );
        if ( tgenechannels.getRecordversion() != null ) {
            tgenechannels1.setRecordversion( BigInteger.valueOf( tgenechannels.getRecordversion() ) );
        }
        tgenechannels1.setDescription( tgenechannels.getDescription() );

        return tgenechannels1;
    }

    @Override
    public TgenechannelsDTO getDto(Tgenechannels tgenechannels) {
        if ( tgenechannels == null ) {
            return null;
        }

        TgenechannelsDTO tgenechannelsDTO = new TgenechannelsDTO();

        tgenechannelsDTO.setChannelcode( tgenechannels.getChannelcode() );
        if ( tgenechannels.getRecordversion() != null ) {
            tgenechannelsDTO.setRecordversion( tgenechannels.getRecordversion().intValue() );
        }
        tgenechannelsDTO.setDescription( tgenechannels.getDescription() );

        return tgenechannelsDTO;
    }
}
