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

import com.qsoft.rs.sincoar.dto.TgenetransactionglosaryPKDTO;
import com.qsoft.rs.sincoar.model.TgenetransactionglosaryPK;
import java.math.BigInteger;
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 TgenetransactionglosaryPKMapperImpl implements TgenetransactionglosaryPKMapper {

    @Override
    public TgenetransactionglosaryPK getEntidad(TgenetransactionglosaryPKDTO tgenetransactionglosaryPK) {
        if ( tgenetransactionglosaryPK == null ) {
            return null;
        }

        TgenetransactionglosaryPK tgenetransactionglosaryPK1 = new TgenetransactionglosaryPK();

        tgenetransactionglosaryPK1.setTransactionmodule( tgenetransactionglosaryPK.getTransactionmodule() );
        if ( tgenetransactionglosaryPK.getTransactioncode() != null ) {
            tgenetransactionglosaryPK1.setTransactioncode( tgenetransactionglosaryPK.getTransactioncode().shortValue() );
        }
        if ( tgenetransactionglosaryPK.getTransactionversion() != null ) {
            tgenetransactionglosaryPK1.setTransactionversion( tgenetransactionglosaryPK.getTransactionversion().shortValue() );
        }
        tgenetransactionglosaryPK1.setLanguagecode( tgenetransactionglosaryPK.getLanguagecode() );
        if ( tgenetransactionglosaryPK.getSequence() != null ) {
            tgenetransactionglosaryPK1.setSequence( BigInteger.valueOf( tgenetransactionglosaryPK.getSequence() ) );
        }

        return tgenetransactionglosaryPK1;
    }

    @Override
    public TgenetransactionglosaryPKDTO getDto(TgenetransactionglosaryPK tgenetransactionglosaryPK) {
        if ( tgenetransactionglosaryPK == null ) {
            return null;
        }

        TgenetransactionglosaryPKDTO tgenetransactionglosaryPKDTO = new TgenetransactionglosaryPKDTO();

        tgenetransactionglosaryPKDTO.setTransactionmodule( tgenetransactionglosaryPK.getTransactionmodule() );
        tgenetransactionglosaryPKDTO.setTransactioncode( (int) tgenetransactionglosaryPK.getTransactioncode() );
        tgenetransactionglosaryPKDTO.setTransactionversion( (int) tgenetransactionglosaryPK.getTransactionversion() );
        tgenetransactionglosaryPKDTO.setLanguagecode( tgenetransactionglosaryPK.getLanguagecode() );
        if ( tgenetransactionglosaryPK.getSequence() != null ) {
            tgenetransactionglosaryPKDTO.setSequence( tgenetransactionglosaryPK.getSequence().intValue() );
        }

        return tgenetransactionglosaryPKDTO;
    }
}
