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

import com.qsoft.rs.sincoar.dto.TgenetransactionreportlinkPKDTO;
import com.qsoft.rs.sincoar.model.TgenetransactionreportlinkPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TgenetransactionreportlinkPK getEntidad(TgenetransactionreportlinkPKDTO tgenetransactionreportlinkPK) {
        if ( tgenetransactionreportlinkPK == null ) {
            return null;
        }

        TgenetransactionreportlinkPK tgenetransactionreportlinkPK1 = new TgenetransactionreportlinkPK();

        tgenetransactionreportlinkPK1.setTransactionmodule( tgenetransactionreportlinkPK.getTransactionmodule() );
        if ( tgenetransactionreportlinkPK.getTransactioncode() != null ) {
            tgenetransactionreportlinkPK1.setTransactioncode( tgenetransactionreportlinkPK.getTransactioncode().shortValue() );
        }
        if ( tgenetransactionreportlinkPK.getTransactionversion() != null ) {
            tgenetransactionreportlinkPK1.setTransactionversion( tgenetransactionreportlinkPK.getTransactionversion().shortValue() );
        }
        if ( tgenetransactionreportlinkPK.getCompanycode() != null ) {
            tgenetransactionreportlinkPK1.setCompanycode( tgenetransactionreportlinkPK.getCompanycode() );
        }

        return tgenetransactionreportlinkPK1;
    }

    @Override
    public TgenetransactionreportlinkPKDTO getDto(TgenetransactionreportlinkPK tgenetransactionreportlinkPK) {
        if ( tgenetransactionreportlinkPK == null ) {
            return null;
        }

        TgenetransactionreportlinkPKDTO tgenetransactionreportlinkPKDTO = new TgenetransactionreportlinkPKDTO();

        tgenetransactionreportlinkPKDTO.setTransactionmodule( tgenetransactionreportlinkPK.getTransactionmodule() );
        tgenetransactionreportlinkPKDTO.setTransactioncode( (int) tgenetransactionreportlinkPK.getTransactioncode() );
        tgenetransactionreportlinkPKDTO.setTransactionversion( (int) tgenetransactionreportlinkPK.getTransactionversion() );
        tgenetransactionreportlinkPKDTO.setCompanycode( (int) tgenetransactionreportlinkPK.getCompanycode() );

        return tgenetransactionreportlinkPKDTO;
    }
}
