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

import com.qsoft.rs.sincoar.dto.TbpmfieldtransactionmapingPKDTO;
import com.qsoft.rs.sincoar.model.TbpmfieldtransactionmapingPK;
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 TbpmfieldtransactionmapingPKMapperImpl implements TbpmfieldtransactionmapingPKMapper {

    @Override
    public TbpmfieldtransactionmapingPK getEntidad(TbpmfieldtransactionmapingPKDTO tbpmfieldtransactionmapingPK) {
        if ( tbpmfieldtransactionmapingPK == null ) {
            return null;
        }

        TbpmfieldtransactionmapingPK tbpmfieldtransactionmapingPK1 = new TbpmfieldtransactionmapingPK();

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

        return tbpmfieldtransactionmapingPK1;
    }

    @Override
    public TbpmfieldtransactionmapingPKDTO getDto(TbpmfieldtransactionmapingPK tbpmfieldtransactionmapingPK) {
        if ( tbpmfieldtransactionmapingPK == null ) {
            return null;
        }

        TbpmfieldtransactionmapingPKDTO tbpmfieldtransactionmapingPKDTO = new TbpmfieldtransactionmapingPKDTO();

        tbpmfieldtransactionmapingPKDTO.setTransactionmodule( tbpmfieldtransactionmapingPK.getTransactionmodule() );
        tbpmfieldtransactionmapingPKDTO.setTransactioncode( (int) tbpmfieldtransactionmapingPK.getTransactioncode() );
        tbpmfieldtransactionmapingPKDTO.setTransactionversion( (int) tbpmfieldtransactionmapingPK.getTransactionversion() );
        tbpmfieldtransactionmapingPKDTO.setFieldname( tbpmfieldtransactionmapingPK.getFieldname() );

        return tbpmfieldtransactionmapingPKDTO;
    }
}
