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

import com.qsoft.rs.sincoar.dto.TgenemessagestructuredataPKDTO;
import com.qsoft.rs.sincoar.model.TgenemessagestructuredataPK;
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 TgenemessagestructuredataPKMapperImpl implements TgenemessagestructuredataPKMapper {

    @Override
    public TgenemessagestructuredataPK getEntidad(TgenemessagestructuredataPKDTO tgenemessagestructuredataPK) {
        if ( tgenemessagestructuredataPK == null ) {
            return null;
        }

        TgenemessagestructuredataPK tgenemessagestructuredataPK1 = new TgenemessagestructuredataPK();

        if ( tgenemessagestructuredataPK.getCode() != null ) {
            tgenemessagestructuredataPK1.setCode( tgenemessagestructuredataPK.getCode().shortValue() );
        }
        tgenemessagestructuredataPK1.setStructurecode( tgenemessagestructuredataPK.getStructurecode() );

        return tgenemessagestructuredataPK1;
    }

    @Override
    public TgenemessagestructuredataPKDTO getDto(TgenemessagestructuredataPK tgenemessagestructuredataPK) {
        if ( tgenemessagestructuredataPK == null ) {
            return null;
        }

        TgenemessagestructuredataPKDTO tgenemessagestructuredataPKDTO = new TgenemessagestructuredataPKDTO();

        tgenemessagestructuredataPKDTO.setCode( (int) tgenemessagestructuredataPK.getCode() );
        tgenemessagestructuredataPKDTO.setStructurecode( tgenemessagestructuredataPK.getStructurecode() );

        return tgenemessagestructuredataPKDTO;
    }
}
