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

import com.qsoft.rs.sincoar.dto.TgenequeryprocessPKDTO;
import com.qsoft.rs.sincoar.model.TgenequeryprocessPK;
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 TgenequeryprocessPKMapperImpl implements TgenequeryprocessPKMapper {

    @Override
    public TgenequeryprocessPK getEntidad(TgenequeryprocessPKDTO tgenequeryprocessPK) {
        if ( tgenequeryprocessPK == null ) {
            return null;
        }

        TgenequeryprocessPK tgenequeryprocessPK1 = new TgenequeryprocessPK();

        tgenequeryprocessPK1.setQuerycode( tgenequeryprocessPK.getQuerycode() );
        if ( tgenequeryprocessPK.getSequence() != null ) {
            tgenequeryprocessPK1.setSequence( tgenequeryprocessPK.getSequence().shortValue() );
        }

        return tgenequeryprocessPK1;
    }

    @Override
    public TgenequeryprocessPKDTO getDto(TgenequeryprocessPK tgenequeryprocessPK) {
        if ( tgenequeryprocessPK == null ) {
            return null;
        }

        TgenequeryprocessPKDTO tgenequeryprocessPKDTO = new TgenequeryprocessPKDTO();

        tgenequeryprocessPKDTO.setQuerycode( tgenequeryprocessPK.getQuerycode() );
        tgenequeryprocessPKDTO.setSequence( (int) tgenequeryprocessPK.getSequence() );

        return tgenequeryprocessPKDTO;
    }
}
