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

import com.qsoft.rs.sincoar.dto.TbpmfieldtransactionoriginPKDTO;
import com.qsoft.rs.sincoar.model.TbpmfieldtransactionoriginPK;
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 TbpmfieldtransactionoriginPKMapperImpl implements TbpmfieldtransactionoriginPKMapper {

    @Override
    public TbpmfieldtransactionoriginPK getEntidad(TbpmfieldtransactionoriginPKDTO tbpmfieldtransactionoriginPK) {
        if ( tbpmfieldtransactionoriginPK == null ) {
            return null;
        }

        TbpmfieldtransactionoriginPK tbpmfieldtransactionoriginPK1 = new TbpmfieldtransactionoriginPK();

        tbpmfieldtransactionoriginPK1.setTransactionmodule( tbpmfieldtransactionoriginPK.getTransactionmodule() );
        if ( tbpmfieldtransactionoriginPK.getTransactioncode() != null ) {
            tbpmfieldtransactionoriginPK1.setTransactioncode( tbpmfieldtransactionoriginPK.getTransactioncode().shortValue() );
        }
        if ( tbpmfieldtransactionoriginPK.getTransactionversion() != null ) {
            tbpmfieldtransactionoriginPK1.setTransactionversion( tbpmfieldtransactionoriginPK.getTransactionversion().shortValue() );
        }
        tbpmfieldtransactionoriginPK1.setFieldname( tbpmfieldtransactionoriginPK.getFieldname() );

        return tbpmfieldtransactionoriginPK1;
    }

    @Override
    public TbpmfieldtransactionoriginPKDTO getDto(TbpmfieldtransactionoriginPK tbpmfieldtransactionoriginPK) {
        if ( tbpmfieldtransactionoriginPK == null ) {
            return null;
        }

        TbpmfieldtransactionoriginPKDTO tbpmfieldtransactionoriginPKDTO = new TbpmfieldtransactionoriginPKDTO();

        tbpmfieldtransactionoriginPKDTO.setTransactionmodule( tbpmfieldtransactionoriginPK.getTransactionmodule() );
        tbpmfieldtransactionoriginPKDTO.setTransactioncode( (int) tbpmfieldtransactionoriginPK.getTransactioncode() );
        tbpmfieldtransactionoriginPKDTO.setTransactionversion( (int) tbpmfieldtransactionoriginPK.getTransactionversion() );
        tbpmfieldtransactionoriginPKDTO.setFieldname( tbpmfieldtransactionoriginPK.getFieldname() );

        return tbpmfieldtransactionoriginPKDTO;
    }
}
