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

import com.qsoft.rs.sincoar.dto.TgenetransactiondescPKDTO;
import com.qsoft.rs.sincoar.model.TgenetransactiondescPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TgenetransactiondescPK getEntidad(TgenetransactiondescPKDTO tgenetransactiondescPK) {
        if ( tgenetransactiondescPK == null ) {
            return null;
        }

        TgenetransactiondescPK tgenetransactiondescPK1 = new TgenetransactiondescPK();

        tgenetransactiondescPK1.setTransactionmodule( tgenetransactiondescPK.getTransactionmodule() );
        if ( tgenetransactiondescPK.getTransactioncode() != null ) {
            tgenetransactiondescPK1.setTransactioncode( tgenetransactiondescPK.getTransactioncode().shortValue() );
        }
        if ( tgenetransactiondescPK.getTransactionversion() != null ) {
            tgenetransactiondescPK1.setTransactionversion( tgenetransactiondescPK.getTransactionversion().shortValue() );
        }
        tgenetransactiondescPK1.setLanguagecode( tgenetransactiondescPK.getLanguagecode() );

        return tgenetransactiondescPK1;
    }

    @Override
    public TgenetransactiondescPKDTO getDto(TgenetransactiondescPK tgenetransactiondescPK) {
        if ( tgenetransactiondescPK == null ) {
            return null;
        }

        TgenetransactiondescPKDTO tgenetransactiondescPKDTO = new TgenetransactiondescPKDTO();

        tgenetransactiondescPKDTO.setTransactionmodule( tgenetransactiondescPK.getTransactionmodule() );
        tgenetransactiondescPKDTO.setTransactioncode( (int) tgenetransactiondescPK.getTransactioncode() );
        tgenetransactiondescPKDTO.setTransactionversion( (int) tgenetransactiondescPK.getTransactionversion() );
        tgenetransactiondescPKDTO.setLanguagecode( tgenetransactiondescPK.getLanguagecode() );

        return tgenetransactiondescPKDTO;
    }
}
