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

import com.qsoft.rs.sincoar.dto.TgeneaccobatchpreviousprocessPKDTO;
import com.qsoft.rs.sincoar.model.TgeneaccobatchpreviousprocessPK;
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 TgeneaccobatchpreviousprocessPKMapperImpl implements TgeneaccobatchpreviousprocessPKMapper {

    @Override
    public TgeneaccobatchpreviousprocessPK getEntidad(TgeneaccobatchpreviousprocessPKDTO tgeneaccobatchpreviousprocessPK) {
        if ( tgeneaccobatchpreviousprocessPK == null ) {
            return null;
        }

        TgeneaccobatchpreviousprocessPK tgeneaccobatchpreviousprocessPK1 = new TgeneaccobatchpreviousprocessPK();

        tgeneaccobatchpreviousprocessPK1.setProcessdate( tgeneaccobatchpreviousprocessPK.getProcessdate() );
        tgeneaccobatchpreviousprocessPK1.setJournalid( tgeneaccobatchpreviousprocessPK.getJournalid() );
        tgeneaccobatchpreviousprocessPK1.setModulecode( tgeneaccobatchpreviousprocessPK.getModulecode() );
        tgeneaccobatchpreviousprocessPK1.setTransactionmodule( tgeneaccobatchpreviousprocessPK.getTransactionmodule() );
        if ( tgeneaccobatchpreviousprocessPK.getTransactioncode() != null ) {
            tgeneaccobatchpreviousprocessPK1.setTransactioncode( tgeneaccobatchpreviousprocessPK.getTransactioncode().shortValue() );
        }
        if ( tgeneaccobatchpreviousprocessPK.getTransactionversion() != null ) {
            tgeneaccobatchpreviousprocessPK1.setTransactionversion( tgeneaccobatchpreviousprocessPK.getTransactionversion().shortValue() );
        }

        return tgeneaccobatchpreviousprocessPK1;
    }

    @Override
    public TgeneaccobatchpreviousprocessPKDTO getDto(TgeneaccobatchpreviousprocessPK tgeneaccobatchpreviousprocessPK) {
        if ( tgeneaccobatchpreviousprocessPK == null ) {
            return null;
        }

        TgeneaccobatchpreviousprocessPKDTO tgeneaccobatchpreviousprocessPKDTO = new TgeneaccobatchpreviousprocessPKDTO();

        tgeneaccobatchpreviousprocessPKDTO.setProcessdate( tgeneaccobatchpreviousprocessPK.getProcessdate() );
        tgeneaccobatchpreviousprocessPKDTO.setJournalid( tgeneaccobatchpreviousprocessPK.getJournalid() );
        tgeneaccobatchpreviousprocessPKDTO.setModulecode( tgeneaccobatchpreviousprocessPK.getModulecode() );
        tgeneaccobatchpreviousprocessPKDTO.setTransactionmodule( tgeneaccobatchpreviousprocessPK.getTransactionmodule() );
        tgeneaccobatchpreviousprocessPKDTO.setTransactioncode( (int) tgeneaccobatchpreviousprocessPK.getTransactioncode() );
        tgeneaccobatchpreviousprocessPKDTO.setTransactionversion( (int) tgeneaccobatchpreviousprocessPK.getTransactionversion() );

        return tgeneaccobatchpreviousprocessPKDTO;
    }
}
