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

import com.qsoft.rs.sincoar.dto.TgeneconceptPKDTO;
import com.qsoft.rs.sincoar.model.TgeneconceptPK;
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 TgeneconceptPKMapperImpl implements TgeneconceptPKMapper {

    @Override
    public TgeneconceptPK getEntidad(TgeneconceptPKDTO tgeneconceptPK) {
        if ( tgeneconceptPK == null ) {
            return null;
        }

        TgeneconceptPK tgeneconceptPK1 = new TgeneconceptPK();

        tgeneconceptPK1.setConceptmodule( tgeneconceptPK.getConceptmodule() );
        if ( tgeneconceptPK.getConceptcode() != null ) {
            tgeneconceptPK1.setConceptcode( tgeneconceptPK.getConceptcode().shortValue() );
        }

        return tgeneconceptPK1;
    }

    @Override
    public TgeneconceptPKDTO getDto(TgeneconceptPK tgeneconceptPK) {
        if ( tgeneconceptPK == null ) {
            return null;
        }

        TgeneconceptPKDTO tgeneconceptPKDTO = new TgeneconceptPKDTO();

        tgeneconceptPKDTO.setConceptmodule( tgeneconceptPK.getConceptmodule() );
        tgeneconceptPKDTO.setConceptcode( (int) tgeneconceptPK.getConceptcode() );

        return tgeneconceptPKDTO;
    }
}
