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

import com.qsoft.rs.sincoar.dto.TcustpeoplevehiclePKDTO;
import com.qsoft.rs.sincoar.model.TcustpeoplevehiclePK;
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 TcustpeoplevehiclePKMapperImpl implements TcustpeoplevehiclePKMapper {

    @Override
    public TcustpeoplevehiclePK getEntidad(TcustpeoplevehiclePKDTO tcustpeoplevehiclePK) {
        if ( tcustpeoplevehiclePK == null ) {
            return null;
        }

        TcustpeoplevehiclePK tcustpeoplevehiclePK1 = new TcustpeoplevehiclePK();

        if ( tcustpeoplevehiclePK.getPersoncode() != null ) {
            tcustpeoplevehiclePK1.setPersoncode( tcustpeoplevehiclePK.getPersoncode() );
        }
        tcustpeoplevehiclePK1.setDateto( tcustpeoplevehiclePK.getDateto() );
        if ( tcustpeoplevehiclePK.getVehiclesequence() != null ) {
            tcustpeoplevehiclePK1.setVehiclesequence( tcustpeoplevehiclePK.getVehiclesequence().shortValue() );
        }

        return tcustpeoplevehiclePK1;
    }

    @Override
    public TcustpeoplevehiclePKDTO getDto(TcustpeoplevehiclePK tcustpeoplevehiclePK) {
        if ( tcustpeoplevehiclePK == null ) {
            return null;
        }

        TcustpeoplevehiclePKDTO tcustpeoplevehiclePKDTO = new TcustpeoplevehiclePKDTO();

        tcustpeoplevehiclePKDTO.setPersoncode( (int) tcustpeoplevehiclePK.getPersoncode() );
        tcustpeoplevehiclePKDTO.setDateto( tcustpeoplevehiclePK.getDateto() );
        tcustpeoplevehiclePKDTO.setVehiclesequence( (int) tcustpeoplevehiclePK.getVehiclesequence() );

        return tcustpeoplevehiclePKDTO;
    }
}
