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

import com.qsoft.rs.sincoar.dto.TgenebatchpreviousprocessPKDTO;
import com.qsoft.rs.sincoar.model.TgenebatchpreviousprocessPK;
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 TgenebatchpreviousprocessPKMapperImpl implements TgenebatchpreviousprocessPKMapper {

    @Override
    public TgenebatchpreviousprocessPK getEntidad(TgenebatchpreviousprocessPKDTO tgenebatchpreviousprocessPK) {
        if ( tgenebatchpreviousprocessPK == null ) {
            return null;
        }

        TgenebatchpreviousprocessPK tgenebatchpreviousprocessPK1 = new TgenebatchpreviousprocessPK();

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

        return tgenebatchpreviousprocessPK1;
    }

    @Override
    public TgenebatchpreviousprocessPKDTO getDto(TgenebatchpreviousprocessPK tgenebatchpreviousprocessPK) {
        if ( tgenebatchpreviousprocessPK == null ) {
            return null;
        }

        TgenebatchpreviousprocessPKDTO tgenebatchpreviousprocessPKDTO = new TgenebatchpreviousprocessPKDTO();

        tgenebatchpreviousprocessPKDTO.setModulecode( tgenebatchpreviousprocessPK.getModulecode() );
        tgenebatchpreviousprocessPKDTO.setTransactionmodule( tgenebatchpreviousprocessPK.getTransactionmodule() );
        tgenebatchpreviousprocessPKDTO.setTransactioncode( (int) tgenebatchpreviousprocessPK.getTransactioncode() );
        tgenebatchpreviousprocessPKDTO.setTransactionversion( (int) tgenebatchpreviousprocessPK.getTransactionversion() );
        tgenebatchpreviousprocessPKDTO.setProcesscode( tgenebatchpreviousprocessPK.getProcesscode() );

        return tgenebatchpreviousprocessPKDTO;
    }
}
