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

import com.qsoft.rs.sincoar.dto.TsafeusercompanyPKDTO;
import com.qsoft.rs.sincoar.model.TsafeusercompanyPK;
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 TsafeusercompanyPKMapperImpl implements TsafeusercompanyPKMapper {

    @Override
    public TsafeusercompanyPK getEntidad(TsafeusercompanyPKDTO tsafeusercompanyPK) {
        if ( tsafeusercompanyPK == null ) {
            return null;
        }

        TsafeusercompanyPK tsafeusercompanyPK1 = new TsafeusercompanyPK();

        tsafeusercompanyPK1.setUsercode( tsafeusercompanyPK.getUsercode() );
        if ( tsafeusercompanyPK.getCompanycode() != null ) {
            tsafeusercompanyPK1.setCompanycode( tsafeusercompanyPK.getCompanycode() );
        }

        return tsafeusercompanyPK1;
    }

    @Override
    public TsafeusercompanyPKDTO getDto(TsafeusercompanyPK tsafeusercompanyPK) {
        if ( tsafeusercompanyPK == null ) {
            return null;
        }

        TsafeusercompanyPKDTO tsafeusercompanyPKDTO = new TsafeusercompanyPKDTO();

        tsafeusercompanyPKDTO.setUsercode( tsafeusercompanyPK.getUsercode() );
        tsafeusercompanyPKDTO.setCompanycode( (int) tsafeusercompanyPK.getCompanycode() );

        return tsafeusercompanyPKDTO;
    }
}
