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

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

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

    @Override
    public Tbpmfield getEntidad(TbpmfieldDTO tbpmfield) {
        if ( tbpmfield == null ) {
            return null;
        }

        Tbpmfield tbpmfield1 = new Tbpmfield();

        tbpmfield1.setFieldname( tbpmfield.getFieldname() );
        if ( tbpmfield.getRecordversion() != null ) {
            tbpmfield1.setRecordversion( BigInteger.valueOf( tbpmfield.getRecordversion() ) );
        }
        tbpmfield1.setDescription( tbpmfield.getDescription() );

        return tbpmfield1;
    }

    @Override
    public TbpmfieldDTO getDto(Tbpmfield tbpmfield) {
        if ( tbpmfield == null ) {
            return null;
        }

        TbpmfieldDTO tbpmfieldDTO = new TbpmfieldDTO();

        tbpmfieldDTO.setFieldname( tbpmfield.getFieldname() );
        if ( tbpmfield.getRecordversion() != null ) {
            tbpmfieldDTO.setRecordversion( tbpmfield.getRecordversion().intValue() );
        }
        tbpmfieldDTO.setDescription( tbpmfield.getDescription() );

        return tbpmfieldDTO;
    }
}
