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

import com.qsoft.rs.sincoar.dto.TgeneaccountbatchpreviousprocePKDTO;
import com.qsoft.rs.sincoar.model.TgeneaccountbatchpreviousprocePK;
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 TgeneaccountbatchpreviousprocePKMapperImpl implements TgeneaccountbatchpreviousprocePKMapper {

    @Override
    public TgeneaccountbatchpreviousprocePK getEntidad(TgeneaccountbatchpreviousprocePKDTO tgeneaccountbatchpreviousprocePK) {
        if ( tgeneaccountbatchpreviousprocePK == null ) {
            return null;
        }

        TgeneaccountbatchpreviousprocePK tgeneaccountbatchpreviousprocePK1 = new TgeneaccountbatchpreviousprocePK();

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

        return tgeneaccountbatchpreviousprocePK1;
    }

    @Override
    public TgeneaccountbatchpreviousprocePKDTO getDto(TgeneaccountbatchpreviousprocePK tgeneaccountbatchpreviousprocePK) {
        if ( tgeneaccountbatchpreviousprocePK == null ) {
            return null;
        }

        TgeneaccountbatchpreviousprocePKDTO tgeneaccountbatchpreviousprocePKDTO = new TgeneaccountbatchpreviousprocePKDTO();

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

        return tgeneaccountbatchpreviousprocePKDTO;
    }
}
