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

import com.qsoft.rs.sincoar.dto.TbpmflowsPKDTO;
import com.qsoft.rs.sincoar.model.TbpmflowsPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TbpmflowsPK getEntidad(TbpmflowsPKDTO tbpmflowsPK) {
        if ( tbpmflowsPK == null ) {
            return null;
        }

        TbpmflowsPK tbpmflowsPK1 = new TbpmflowsPK();

        tbpmflowsPK1.setFlowcode( tbpmflowsPK.getFlowcode() );
        if ( tbpmflowsPK.getCompanycode() != null ) {
            tbpmflowsPK1.setCompanycode( tbpmflowsPK.getCompanycode() );
        }

        return tbpmflowsPK1;
    }

    @Override
    public TbpmflowsPKDTO getDto(TbpmflowsPK tbpmflowsPK) {
        if ( tbpmflowsPK == null ) {
            return null;
        }

        TbpmflowsPKDTO tbpmflowsPKDTO = new TbpmflowsPKDTO();

        tbpmflowsPKDTO.setFlowcode( tbpmflowsPK.getFlowcode() );
        tbpmflowsPKDTO.setCompanycode( (int) tbpmflowsPK.getCompanycode() );

        return tbpmflowsPKDTO;
    }
}
