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

import com.qsoft.rs.sincoar.dto.TgenetransactionprocessPKDTO;
import com.qsoft.rs.sincoar.model.TgenetransactionprocessPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TgenetransactionprocessPK getEntidad(TgenetransactionprocessPKDTO tgenetransactionprocessPK) {
        if ( tgenetransactionprocessPK == null ) {
            return null;
        }

        TgenetransactionprocessPK tgenetransactionprocessPK1 = new TgenetransactionprocessPK();

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

        return tgenetransactionprocessPK1;
    }

    @Override
    public TgenetransactionprocessPKDTO getDto(TgenetransactionprocessPK tgenetransactionprocessPK) {
        if ( tgenetransactionprocessPK == null ) {
            return null;
        }

        TgenetransactionprocessPKDTO tgenetransactionprocessPKDTO = new TgenetransactionprocessPKDTO();

        tgenetransactionprocessPKDTO.setTransactionmodule( tgenetransactionprocessPK.getTransactionmodule() );
        tgenetransactionprocessPKDTO.setTransactioncode( (int) tgenetransactionprocessPK.getTransactioncode() );
        tgenetransactionprocessPKDTO.setTransactionversion( (int) tgenetransactionprocessPK.getTransactionversion() );
        tgenetransactionprocessPKDTO.setSequence( (int) tgenetransactionprocessPK.getSequence() );

        return tgenetransactionprocessPKDTO;
    }
}
