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

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

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

    @Override
    public Tgenemessagetemplates getEntidad(TgenemessagetemplatesDTO tgenemessagetemplates) {
        if ( tgenemessagetemplates == null ) {
            return null;
        }

        Tgenemessagetemplates tgenemessagetemplates1 = new Tgenemessagetemplates();

        tgenemessagetemplates1.setCode( tgenemessagetemplates.getCode() );
        if ( tgenemessagetemplates.getRecordversion() != null ) {
            tgenemessagetemplates1.setRecordversion( BigInteger.valueOf( tgenemessagetemplates.getRecordversion() ) );
        }
        tgenemessagetemplates1.setDescription( tgenemessagetemplates.getDescription() );

        return tgenemessagetemplates1;
    }

    @Override
    public TgenemessagetemplatesDTO getDto(Tgenemessagetemplates tgenemessagetemplates) {
        if ( tgenemessagetemplates == null ) {
            return null;
        }

        TgenemessagetemplatesDTO tgenemessagetemplatesDTO = new TgenemessagetemplatesDTO();

        tgenemessagetemplatesDTO.setCode( tgenemessagetemplates.getCode() );
        if ( tgenemessagetemplates.getRecordversion() != null ) {
            tgenemessagetemplatesDTO.setRecordversion( tgenemessagetemplates.getRecordversion().intValue() );
        }
        tgenemessagetemplatesDTO.setDescription( tgenemessagetemplates.getDescription() );

        return tgenemessagetemplatesDTO;
    }
}
