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

import com.qsoft.rs.sincoar.dto.TgenetechnicalpatrimonyPKDTO;
import com.qsoft.rs.sincoar.model.TgenetechnicalpatrimonyPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TgenetechnicalpatrimonyPK getEntidad(TgenetechnicalpatrimonyPKDTO tgenetechnicalpatrimonyPK) {
        if ( tgenetechnicalpatrimonyPK == null ) {
            return null;
        }

        TgenetechnicalpatrimonyPK tgenetechnicalpatrimonyPK1 = new TgenetechnicalpatrimonyPK();

        if ( tgenetechnicalpatrimonyPK.getCompanycode() != null ) {
            tgenetechnicalpatrimonyPK1.setCompanycode( tgenetechnicalpatrimonyPK.getCompanycode() );
        }
        tgenetechnicalpatrimonyPK1.setDateto( tgenetechnicalpatrimonyPK.getDateto() );

        return tgenetechnicalpatrimonyPK1;
    }

    @Override
    public TgenetechnicalpatrimonyPKDTO getDto(TgenetechnicalpatrimonyPK tgenetechnicalpatrimonyPK) {
        if ( tgenetechnicalpatrimonyPK == null ) {
            return null;
        }

        TgenetechnicalpatrimonyPKDTO tgenetechnicalpatrimonyPKDTO = new TgenetechnicalpatrimonyPKDTO();

        tgenetechnicalpatrimonyPKDTO.setCompanycode( (int) tgenetechnicalpatrimonyPK.getCompanycode() );
        tgenetechnicalpatrimonyPKDTO.setDateto( tgenetechnicalpatrimonyPK.getDateto() );

        return tgenetechnicalpatrimonyPKDTO;
    }
}
