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

import com.qsoft.rs.sincoar.dto.TsafeuserdetailPKDTO;
import com.qsoft.rs.sincoar.model.TsafeuserdetailPK;
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 TsafeuserdetailPKMapperImpl implements TsafeuserdetailPKMapper {

    @Override
    public TsafeuserdetailPK getEntidad(TsafeuserdetailPKDTO tsafeuserdetailPK) {
        if ( tsafeuserdetailPK == null ) {
            return null;
        }

        TsafeuserdetailPK tsafeuserdetailPK1 = new TsafeuserdetailPK();

        tsafeuserdetailPK1.setUsercode( tsafeuserdetailPK.getUsercode() );
        if ( tsafeuserdetailPK.getPersoncode() != null ) {
            tsafeuserdetailPK1.setPersoncode( tsafeuserdetailPK.getPersoncode() );
        }
        tsafeuserdetailPK1.setDateto( tsafeuserdetailPK.getDateto() );

        return tsafeuserdetailPK1;
    }

    @Override
    public TsafeuserdetailPKDTO getDto(TsafeuserdetailPK tsafeuserdetailPK) {
        if ( tsafeuserdetailPK == null ) {
            return null;
        }

        TsafeuserdetailPKDTO tsafeuserdetailPKDTO = new TsafeuserdetailPKDTO();

        tsafeuserdetailPKDTO.setUsercode( tsafeuserdetailPK.getUsercode() );
        tsafeuserdetailPKDTO.setPersoncode( (int) tsafeuserdetailPK.getPersoncode() );
        tsafeuserdetailPKDTO.setDateto( tsafeuserdetailPK.getDateto() );

        return tsafeuserdetailPKDTO;
    }
}
