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

import com.qsoft.rs.sincoar.dto.TgenebaseaccountPKDTO;
import com.qsoft.rs.sincoar.model.TgenebaseaccountPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TgenebaseaccountPK getEntidad(TgenebaseaccountPKDTO tgenebaseaccountPK) {
        if ( tgenebaseaccountPK == null ) {
            return null;
        }

        TgenebaseaccountPK tgenebaseaccountPK1 = new TgenebaseaccountPK();

        tgenebaseaccountPK1.setAccount( tgenebaseaccountPK.getAccount() );
        if ( tgenebaseaccountPK.getCompany() != null ) {
            tgenebaseaccountPK1.setCompany( tgenebaseaccountPK.getCompany() );
        }

        return tgenebaseaccountPK1;
    }

    @Override
    public TgenebaseaccountPKDTO getDto(TgenebaseaccountPK tgenebaseaccountPK) {
        if ( tgenebaseaccountPK == null ) {
            return null;
        }

        TgenebaseaccountPKDTO tgenebaseaccountPKDTO = new TgenebaseaccountPKDTO();

        tgenebaseaccountPKDTO.setAccount( tgenebaseaccountPK.getAccount() );
        tgenebaseaccountPKDTO.setCompany( (int) tgenebaseaccountPK.getCompany() );

        return tgenebaseaccountPKDTO;
    }
}
