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

import com.qsoft.rs.sincoar.dto.TgeneconceptdescPKDTO;
import com.qsoft.rs.sincoar.model.TgeneconceptdescPK;
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 TgeneconceptdescPKMapperImpl implements TgeneconceptdescPKMapper {

    @Override
    public TgeneconceptdescPK getEntidad(TgeneconceptdescPKDTO tgeneconceptdescPK) {
        if ( tgeneconceptdescPK == null ) {
            return null;
        }

        TgeneconceptdescPK tgeneconceptdescPK1 = new TgeneconceptdescPK();

        tgeneconceptdescPK1.setConceptmodule( tgeneconceptdescPK.getConceptmodule() );
        if ( tgeneconceptdescPK.getConceptcode() != null ) {
            tgeneconceptdescPK1.setConceptcode( tgeneconceptdescPK.getConceptcode().shortValue() );
        }
        tgeneconceptdescPK1.setLanguagecode( tgeneconceptdescPK.getLanguagecode() );

        return tgeneconceptdescPK1;
    }

    @Override
    public TgeneconceptdescPKDTO getDto(TgeneconceptdescPK tgeneconceptdescPK) {
        if ( tgeneconceptdescPK == null ) {
            return null;
        }

        TgeneconceptdescPKDTO tgeneconceptdescPKDTO = new TgeneconceptdescPKDTO();

        tgeneconceptdescPKDTO.setConceptmodule( tgeneconceptdescPK.getConceptmodule() );
        tgeneconceptdescPKDTO.setConceptcode( (int) tgeneconceptdescPK.getConceptcode() );
        tgeneconceptdescPKDTO.setLanguagecode( tgeneconceptdescPK.getLanguagecode() );

        return tgeneconceptdescPKDTO;
    }
}
