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

import com.qsoft.rs.sincoar.dto.TgenetransactionreportsPKDTO;
import com.qsoft.rs.sincoar.model.TgenetransactionreportsPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TgenetransactionreportsPK getEntidad(TgenetransactionreportsPKDTO tgenetransactionreportsPK) {
        if ( tgenetransactionreportsPK == null ) {
            return null;
        }

        TgenetransactionreportsPK tgenetransactionreportsPK1 = new TgenetransactionreportsPK();

        tgenetransactionreportsPK1.setTransactionmodule( tgenetransactionreportsPK.getTransactionmodule() );
        if ( tgenetransactionreportsPK.getTransactioncode() != null ) {
            tgenetransactionreportsPK1.setTransactioncode( tgenetransactionreportsPK.getTransactioncode().shortValue() );
        }
        if ( tgenetransactionreportsPK.getTransactionversion() != null ) {
            tgenetransactionreportsPK1.setTransactionversion( tgenetransactionreportsPK.getTransactionversion().shortValue() );
        }
        if ( tgenetransactionreportsPK.getSequence() != null ) {
            tgenetransactionreportsPK1.setSequence( tgenetransactionreportsPK.getSequence().shortValue() );
        }

        return tgenetransactionreportsPK1;
    }

    @Override
    public TgenetransactionreportsPKDTO getDto(TgenetransactionreportsPK tgenetransactionreportsPK) {
        if ( tgenetransactionreportsPK == null ) {
            return null;
        }

        TgenetransactionreportsPKDTO tgenetransactionreportsPKDTO = new TgenetransactionreportsPKDTO();

        tgenetransactionreportsPKDTO.setTransactionmodule( tgenetransactionreportsPK.getTransactionmodule() );
        tgenetransactionreportsPKDTO.setTransactioncode( (int) tgenetransactionreportsPK.getTransactioncode() );
        tgenetransactionreportsPKDTO.setTransactionversion( (int) tgenetransactionreportsPK.getTransactionversion() );
        tgenetransactionreportsPKDTO.setSequence( (int) tgenetransactionreportsPK.getSequence() );

        return tgenetransactionreportsPKDTO;
    }
}
