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

import com.qsoft.rs.sincoar.dto.TgenemessagestructureheaderPKDTO;
import com.qsoft.rs.sincoar.model.TgenemessagestructureheaderPK;
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 TgenemessagestructureheaderPKMapperImpl implements TgenemessagestructureheaderPKMapper {

    @Override
    public TgenemessagestructureheaderPK getEntidad(TgenemessagestructureheaderPKDTO tgenemessagestructureheaderPK) {
        if ( tgenemessagestructureheaderPK == null ) {
            return null;
        }

        TgenemessagestructureheaderPK tgenemessagestructureheaderPK1 = new TgenemessagestructureheaderPK();

        if ( tgenemessagestructureheaderPK.getCode() != null ) {
            tgenemessagestructureheaderPK1.setCode( tgenemessagestructureheaderPK.getCode().shortValue() );
        }
        tgenemessagestructureheaderPK1.setStructurecode( tgenemessagestructureheaderPK.getStructurecode() );

        return tgenemessagestructureheaderPK1;
    }

    @Override
    public TgenemessagestructureheaderPKDTO getDto(TgenemessagestructureheaderPK tgenemessagestructureheaderPK) {
        if ( tgenemessagestructureheaderPK == null ) {
            return null;
        }

        TgenemessagestructureheaderPKDTO tgenemessagestructureheaderPKDTO = new TgenemessagestructureheaderPKDTO();

        tgenemessagestructureheaderPKDTO.setCode( (int) tgenemessagestructureheaderPK.getCode() );
        tgenemessagestructureheaderPKDTO.setStructurecode( tgenemessagestructureheaderPK.getStructurecode() );

        return tgenemessagestructureheaderPKDTO;
    }
}
