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

import com.qsoft.rs.sincoar.dto.TgenetransactionqueryPKDTO;
import com.qsoft.rs.sincoar.model.TgenetransactionqueryPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TgenetransactionqueryPK getEntidad(TgenetransactionqueryPKDTO tgenetransactionqueryPK) {
        if ( tgenetransactionqueryPK == null ) {
            return null;
        }

        TgenetransactionqueryPK tgenetransactionqueryPK1 = new TgenetransactionqueryPK();

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

        return tgenetransactionqueryPK1;
    }

    @Override
    public TgenetransactionqueryPKDTO getDto(TgenetransactionqueryPK tgenetransactionqueryPK) {
        if ( tgenetransactionqueryPK == null ) {
            return null;
        }

        TgenetransactionqueryPKDTO tgenetransactionqueryPKDTO = new TgenetransactionqueryPKDTO();

        tgenetransactionqueryPKDTO.setTransactionmodule( tgenetransactionqueryPK.getTransactionmodule() );
        tgenetransactionqueryPKDTO.setTransactioncode( (int) tgenetransactionqueryPK.getTransactioncode() );
        tgenetransactionqueryPKDTO.setTransactionversion( (int) tgenetransactionqueryPK.getTransactionversion() );
        tgenetransactionqueryPKDTO.setSequence( (int) tgenetransactionqueryPK.getSequence() );

        return tgenetransactionqueryPKDTO;
    }
}
