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

import com.qsoft.rs.sincoar.dto.TcustpeopleotherassetsPKDTO;
import com.qsoft.rs.sincoar.model.TcustpeopleotherassetsPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TcustpeopleotherassetsPK getEntidad(TcustpeopleotherassetsPKDTO tcustpeopleotherassetsPK) {
        if ( tcustpeopleotherassetsPK == null ) {
            return null;
        }

        TcustpeopleotherassetsPK tcustpeopleotherassetsPK1 = new TcustpeopleotherassetsPK();

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

        return tcustpeopleotherassetsPK1;
    }

    @Override
    public TcustpeopleotherassetsPKDTO getDto(TcustpeopleotherassetsPK tcustpeopleotherassetsPK) {
        if ( tcustpeopleotherassetsPK == null ) {
            return null;
        }

        TcustpeopleotherassetsPKDTO tcustpeopleotherassetsPKDTO = new TcustpeopleotherassetsPKDTO();

        tcustpeopleotherassetsPKDTO.setPersoncode( (int) tcustpeopleotherassetsPK.getPersoncode() );
        tcustpeopleotherassetsPKDTO.setDateto( tcustpeopleotherassetsPK.getDateto() );
        tcustpeopleotherassetsPKDTO.setAssetssequence( (int) tcustpeopleotherassetsPK.getAssetssequence() );

        return tcustpeopleotherassetsPKDTO;
    }
}
