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

import com.qsoft.rs.sincoar.dto.TgenechargescheckbookPKDTO;
import com.qsoft.rs.sincoar.model.TgenechargescheckbookPK;
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 TgenechargescheckbookPKMapperImpl implements TgenechargescheckbookPKMapper {

    @Override
    public TgenechargescheckbookPK getEntidad(TgenechargescheckbookPKDTO tgenechargescheckbookPK) {
        if ( tgenechargescheckbookPK == null ) {
            return null;
        }

        TgenechargescheckbookPK tgenechargescheckbookPK1 = new TgenechargescheckbookPK();

        tgenechargescheckbookPK1.setCheckbooktypecatalog( tgenechargescheckbookPK.getCheckbooktypecatalog() );
        tgenechargescheckbookPK1.setCheckbooktypecatalogcode( tgenechargescheckbookPK.getCheckbooktypecatalogcode() );
        if ( tgenechargescheckbookPK.getCompanycode() != null ) {
            tgenechargescheckbookPK1.setCompanycode( tgenechargescheckbookPK.getCompanycode() );
        }
        tgenechargescheckbookPK1.setCurrencycode( tgenechargescheckbookPK.getCurrencycode() );

        return tgenechargescheckbookPK1;
    }

    @Override
    public TgenechargescheckbookPKDTO getDto(TgenechargescheckbookPK tgenechargescheckbookPK) {
        if ( tgenechargescheckbookPK == null ) {
            return null;
        }

        TgenechargescheckbookPKDTO tgenechargescheckbookPKDTO = new TgenechargescheckbookPKDTO();

        tgenechargescheckbookPKDTO.setCheckbooktypecatalog( tgenechargescheckbookPK.getCheckbooktypecatalog() );
        tgenechargescheckbookPKDTO.setCheckbooktypecatalogcode( tgenechargescheckbookPK.getCheckbooktypecatalogcode() );
        tgenechargescheckbookPKDTO.setCompanycode( (int) tgenechargescheckbookPK.getCompanycode() );
        tgenechargescheckbookPKDTO.setCurrencycode( tgenechargescheckbookPK.getCurrencycode() );

        return tgenechargescheckbookPKDTO;
    }
}
