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

import com.qsoft.rs.sincoar.dto.TgenebatchprocessPKDTO;
import com.qsoft.rs.sincoar.model.TgenebatchprocessPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TgenebatchprocessPK getEntidad(TgenebatchprocessPKDTO tgenebatchprocessPK) {
        if ( tgenebatchprocessPK == null ) {
            return null;
        }

        TgenebatchprocessPK tgenebatchprocessPK1 = new TgenebatchprocessPK();

        tgenebatchprocessPK1.setModulecode( tgenebatchprocessPK.getModulecode() );
        tgenebatchprocessPK1.setTransactionmodule( tgenebatchprocessPK.getTransactionmodule() );
        if ( tgenebatchprocessPK.getTransactioncode() != null ) {
            tgenebatchprocessPK1.setTransactioncode( tgenebatchprocessPK.getTransactioncode().shortValue() );
        }
        if ( tgenebatchprocessPK.getTransactionversion() != null ) {
            tgenebatchprocessPK1.setTransactionversion( tgenebatchprocessPK.getTransactionversion().shortValue() );
        }
        tgenebatchprocessPK1.setProcesscode( tgenebatchprocessPK.getProcesscode() );

        return tgenebatchprocessPK1;
    }

    @Override
    public TgenebatchprocessPKDTO getDto(TgenebatchprocessPK tgenebatchprocessPK) {
        if ( tgenebatchprocessPK == null ) {
            return null;
        }

        TgenebatchprocessPKDTO tgenebatchprocessPKDTO = new TgenebatchprocessPKDTO();

        tgenebatchprocessPKDTO.setModulecode( tgenebatchprocessPK.getModulecode() );
        tgenebatchprocessPKDTO.setTransactionmodule( tgenebatchprocessPK.getTransactionmodule() );
        tgenebatchprocessPKDTO.setTransactioncode( (int) tgenebatchprocessPK.getTransactioncode() );
        tgenebatchprocessPKDTO.setTransactionversion( (int) tgenebatchprocessPK.getTransactionversion() );
        tgenebatchprocessPKDTO.setProcesscode( tgenebatchprocessPK.getProcesscode() );

        return tgenebatchprocessPKDTO;
    }
}
