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

import com.qsoft.rs.sincoar.dto.TbpmgroupsusersPKDTO;
import com.qsoft.rs.sincoar.model.TbpmgroupsusersPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TbpmgroupsusersPK getEntidad(TbpmgroupsusersPKDTO tbpmgroupsusersPK) {
        if ( tbpmgroupsusersPK == null ) {
            return null;
        }

        TbpmgroupsusersPK tbpmgroupsusersPK1 = new TbpmgroupsusersPK();

        tbpmgroupsusersPK1.setUsercode( tbpmgroupsusersPK.getUsercode() );
        tbpmgroupsusersPK1.setGroupcode( tbpmgroupsusersPK.getGroupcode() );
        if ( tbpmgroupsusersPK.getCompanycode() != null ) {
            tbpmgroupsusersPK1.setCompanycode( tbpmgroupsusersPK.getCompanycode() );
        }

        return tbpmgroupsusersPK1;
    }

    @Override
    public TbpmgroupsusersPKDTO getDto(TbpmgroupsusersPK tbpmgroupsusersPK) {
        if ( tbpmgroupsusersPK == null ) {
            return null;
        }

        TbpmgroupsusersPKDTO tbpmgroupsusersPKDTO = new TbpmgroupsusersPKDTO();

        tbpmgroupsusersPKDTO.setUsercode( tbpmgroupsusersPK.getUsercode() );
        tbpmgroupsusersPKDTO.setGroupcode( tbpmgroupsusersPK.getGroupcode() );
        tbpmgroupsusersPKDTO.setCompanycode( (int) tbpmgroupsusersPK.getCompanycode() );

        return tbpmgroupsusersPKDTO;
    }
}
