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

import com.qsoft.rs.sincoar.dto.TbpmrulesPKDTO;
import com.qsoft.rs.sincoar.model.TbpmrulesPK;
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 TbpmrulesPKMapperImpl implements TbpmrulesPKMapper {

    @Override
    public TbpmrulesPK getEntidad(TbpmrulesPKDTO tbpmrulesPK) {
        if ( tbpmrulesPK == null ) {
            return null;
        }

        TbpmrulesPK tbpmrulesPK1 = new TbpmrulesPK();

        tbpmrulesPK1.setRulecode( tbpmrulesPK.getRulecode() );
        if ( tbpmrulesPK.getCompanycode() != null ) {
            tbpmrulesPK1.setCompanycode( tbpmrulesPK.getCompanycode() );
        }

        return tbpmrulesPK1;
    }

    @Override
    public TbpmrulesPKDTO getDto(TbpmrulesPK tbpmrulesPK) {
        if ( tbpmrulesPK == null ) {
            return null;
        }

        TbpmrulesPKDTO tbpmrulesPKDTO = new TbpmrulesPKDTO();

        tbpmrulesPKDTO.setRulecode( tbpmrulesPK.getRulecode() );
        tbpmrulesPKDTO.setCompanycode( (int) tbpmrulesPK.getCompanycode() );

        return tbpmrulesPKDTO;
    }
}
