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

import com.qsoft.rs.sincoar.dto.TgeneaccountbatchprocessPKDTO;
import com.qsoft.rs.sincoar.model.TgeneaccountbatchprocessPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TgeneaccountbatchprocessPK getEntidad(TgeneaccountbatchprocessPKDTO tgeneaccountbatchprocessPK) {
        if ( tgeneaccountbatchprocessPK == null ) {
            return null;
        }

        TgeneaccountbatchprocessPK tgeneaccountbatchprocessPK1 = new TgeneaccountbatchprocessPK();

        tgeneaccountbatchprocessPK1.setAccount( tgeneaccountbatchprocessPK.getAccount() );
        if ( tgeneaccountbatchprocessPK.getCompany() != null ) {
            tgeneaccountbatchprocessPK1.setCompany( tgeneaccountbatchprocessPK.getCompany() );
        }
        tgeneaccountbatchprocessPK1.setProcessdate( tgeneaccountbatchprocessPK.getProcessdate() );
        tgeneaccountbatchprocessPK1.setActioncode( tgeneaccountbatchprocessPK.getActioncode() );
        tgeneaccountbatchprocessPK1.setModulecode( tgeneaccountbatchprocessPK.getModulecode() );
        tgeneaccountbatchprocessPK1.setTransactionmodule( tgeneaccountbatchprocessPK.getTransactionmodule() );
        if ( tgeneaccountbatchprocessPK.getTransactioncode() != null ) {
            tgeneaccountbatchprocessPK1.setTransactioncode( tgeneaccountbatchprocessPK.getTransactioncode().shortValue() );
        }
        if ( tgeneaccountbatchprocessPK.getTransactionversion() != null ) {
            tgeneaccountbatchprocessPK1.setTransactionversion( tgeneaccountbatchprocessPK.getTransactionversion().shortValue() );
        }

        return tgeneaccountbatchprocessPK1;
    }

    @Override
    public TgeneaccountbatchprocessPKDTO getDto(TgeneaccountbatchprocessPK tgeneaccountbatchprocessPK) {
        if ( tgeneaccountbatchprocessPK == null ) {
            return null;
        }

        TgeneaccountbatchprocessPKDTO tgeneaccountbatchprocessPKDTO = new TgeneaccountbatchprocessPKDTO();

        tgeneaccountbatchprocessPKDTO.setAccount( tgeneaccountbatchprocessPK.getAccount() );
        tgeneaccountbatchprocessPKDTO.setCompany( (int) tgeneaccountbatchprocessPK.getCompany() );
        tgeneaccountbatchprocessPKDTO.setProcessdate( tgeneaccountbatchprocessPK.getProcessdate() );
        tgeneaccountbatchprocessPKDTO.setActioncode( tgeneaccountbatchprocessPK.getActioncode() );
        tgeneaccountbatchprocessPKDTO.setModulecode( tgeneaccountbatchprocessPK.getModulecode() );
        tgeneaccountbatchprocessPKDTO.setTransactionmodule( tgeneaccountbatchprocessPK.getTransactionmodule() );
        tgeneaccountbatchprocessPKDTO.setTransactioncode( (int) tgeneaccountbatchprocessPK.getTransactioncode() );
        tgeneaccountbatchprocessPKDTO.setTransactionversion( (int) tgeneaccountbatchprocessPK.getTransactionversion() );

        return tgeneaccountbatchprocessPKDTO;
    }
}
