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

import com.qsoft.rs.sincoar.dto.TgenefrequencydescPKDTO;
import com.qsoft.rs.sincoar.model.TgenefrequencydescPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TgenefrequencydescPK getEntidad(TgenefrequencydescPKDTO tgenefrequencydescPK) {
        if ( tgenefrequencydescPK == null ) {
            return null;
        }

        TgenefrequencydescPK tgenefrequencydescPK1 = new TgenefrequencydescPK();

        if ( tgenefrequencydescPK.getFrequencycode() != null ) {
            tgenefrequencydescPK1.setFrequencycode( tgenefrequencydescPK.getFrequencycode().shortValue() );
        }
        tgenefrequencydescPK1.setLanguage( tgenefrequencydescPK.getLanguage() );

        return tgenefrequencydescPK1;
    }

    @Override
    public TgenefrequencydescPKDTO getDto(TgenefrequencydescPK tgenefrequencydescPK) {
        if ( tgenefrequencydescPK == null ) {
            return null;
        }

        TgenefrequencydescPKDTO tgenefrequencydescPKDTO = new TgenefrequencydescPKDTO();

        tgenefrequencydescPKDTO.setFrequencycode( (int) tgenefrequencydescPK.getFrequencycode() );
        tgenefrequencydescPKDTO.setLanguage( tgenefrequencydescPK.getLanguage() );

        return tgenefrequencydescPKDTO;
    }
}
