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

import com.qsoft.rs.sincoar.dto.TcustpeoplerealassetsPKDTO;
import com.qsoft.rs.sincoar.model.TcustpeoplerealassetsPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TcustpeoplerealassetsPK getEntidad(TcustpeoplerealassetsPKDTO tcustpeoplerealassetsPK) {
        if ( tcustpeoplerealassetsPK == null ) {
            return null;
        }

        TcustpeoplerealassetsPK tcustpeoplerealassetsPK1 = new TcustpeoplerealassetsPK();

        if ( tcustpeoplerealassetsPK.getPersoncode() != null ) {
            tcustpeoplerealassetsPK1.setPersoncode( tcustpeoplerealassetsPK.getPersoncode() );
        }
        tcustpeoplerealassetsPK1.setDateto( tcustpeoplerealassetsPK.getDateto() );
        if ( tcustpeoplerealassetsPK.getAssetssequence() != null ) {
            tcustpeoplerealassetsPK1.setAssetssequence( tcustpeoplerealassetsPK.getAssetssequence().shortValue() );
        }

        return tcustpeoplerealassetsPK1;
    }

    @Override
    public TcustpeoplerealassetsPKDTO getDto(TcustpeoplerealassetsPK tcustpeoplerealassetsPK) {
        if ( tcustpeoplerealassetsPK == null ) {
            return null;
        }

        TcustpeoplerealassetsPKDTO tcustpeoplerealassetsPKDTO = new TcustpeoplerealassetsPKDTO();

        tcustpeoplerealassetsPKDTO.setPersoncode( (int) tcustpeoplerealassetsPK.getPersoncode() );
        tcustpeoplerealassetsPKDTO.setDateto( tcustpeoplerealassetsPK.getDateto() );
        tcustpeoplerealassetsPKDTO.setAssetssequence( (int) tcustpeoplerealassetsPK.getAssetssequence() );

        return tcustpeoplerealassetsPKDTO;
    }
}
