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

import com.qsoft.rs.sincoar.dto.TgenetransactionPKDTO;
import com.qsoft.rs.sincoar.model.TgenetransactionPK;
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 TgenetransactionPKMapperImpl implements TgenetransactionPKMapper {

    @Override
    public TgenetransactionPK getEntidad(TgenetransactionPKDTO tgenetransactionPK) {
        if ( tgenetransactionPK == null ) {
            return null;
        }

        TgenetransactionPK tgenetransactionPK1 = new TgenetransactionPK();

        tgenetransactionPK1.setTransactionmodule( tgenetransactionPK.getTransactionmodule() );
        if ( tgenetransactionPK.getTransactioncode() != null ) {
            tgenetransactionPK1.setTransactioncode( tgenetransactionPK.getTransactioncode().shortValue() );
        }
        if ( tgenetransactionPK.getTransactionversion() != null ) {
            tgenetransactionPK1.setTransactionversion( tgenetransactionPK.getTransactionversion().shortValue() );
        }

        return tgenetransactionPK1;
    }

    @Override
    public TgenetransactionPKDTO getDto(TgenetransactionPK tgenetransactionPK) {
        if ( tgenetransactionPK == null ) {
            return null;
        }

        TgenetransactionPKDTO tgenetransactionPKDTO = new TgenetransactionPKDTO();

        tgenetransactionPKDTO.setTransactionmodule( tgenetransactionPK.getTransactionmodule() );
        tgenetransactionPKDTO.setTransactioncode( (int) tgenetransactionPK.getTransactioncode() );
        tgenetransactionPKDTO.setTransactionversion( (int) tgenetransactionPK.getTransactionversion() );

        return tgenetransactionPKDTO;
    }
}
