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

import com.qsoft.rs.sincoar.dto.TlogloaderrorPKDTO;
import com.qsoft.rs.sincoar.model.TlogloaderrorPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TlogloaderrorPK getEntidad(TlogloaderrorPKDTO tlogloaderrorPK) {
        if ( tlogloaderrorPK == null ) {
            return null;
        }

        TlogloaderrorPK tlogloaderrorPK1 = new TlogloaderrorPK();

        tlogloaderrorPK1.setJournalid( tlogloaderrorPK.getJournalid() );
        if ( tlogloaderrorPK.getLoadsequence() != null ) {
            tlogloaderrorPK1.setLoadsequence( tlogloaderrorPK.getLoadsequence() );
        }
        if ( tlogloaderrorPK.getErrorsequence() != null ) {
            tlogloaderrorPK1.setErrorsequence( tlogloaderrorPK.getErrorsequence().shortValue() );
        }

        return tlogloaderrorPK1;
    }

    @Override
    public TlogloaderrorPKDTO getDto(TlogloaderrorPK tlogloaderrorPK) {
        if ( tlogloaderrorPK == null ) {
            return null;
        }

        TlogloaderrorPKDTO tlogloaderrorPKDTO = new TlogloaderrorPKDTO();

        tlogloaderrorPKDTO.setJournalid( tlogloaderrorPK.getJournalid() );
        tlogloaderrorPKDTO.setLoadsequence( (int) tlogloaderrorPK.getLoadsequence() );
        tlogloaderrorPKDTO.setErrorsequence( (int) tlogloaderrorPK.getErrorsequence() );

        return tlogloaderrorPKDTO;
    }
}
