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

import com.qsoft.rs.sincoar.dto.TcustpeopleexpensesPKDTO;
import com.qsoft.rs.sincoar.model.TcustpeopleexpensesPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TcustpeopleexpensesPK getEntidad(TcustpeopleexpensesPKDTO tcustpeopleexpensesPK) {
        if ( tcustpeopleexpensesPK == null ) {
            return null;
        }

        TcustpeopleexpensesPK tcustpeopleexpensesPK1 = new TcustpeopleexpensesPK();

        if ( tcustpeopleexpensesPK.getPersoncode() != null ) {
            tcustpeopleexpensesPK1.setPersoncode( tcustpeopleexpensesPK.getPersoncode() );
        }
        tcustpeopleexpensesPK1.setDateto( tcustpeopleexpensesPK.getDateto() );
        if ( tcustpeopleexpensesPK.getExpensesequence() != null ) {
            tcustpeopleexpensesPK1.setExpensesequence( tcustpeopleexpensesPK.getExpensesequence().shortValue() );
        }

        return tcustpeopleexpensesPK1;
    }

    @Override
    public TcustpeopleexpensesPKDTO getDto(TcustpeopleexpensesPK tcustpeopleexpensesPK) {
        if ( tcustpeopleexpensesPK == null ) {
            return null;
        }

        TcustpeopleexpensesPKDTO tcustpeopleexpensesPKDTO = new TcustpeopleexpensesPKDTO();

        tcustpeopleexpensesPKDTO.setPersoncode( (int) tcustpeopleexpensesPK.getPersoncode() );
        tcustpeopleexpensesPKDTO.setDateto( tcustpeopleexpensesPK.getDateto() );
        tcustpeopleexpensesPKDTO.setExpensesequence( (int) tcustpeopleexpensesPK.getExpensesequence() );

        return tcustpeopleexpensesPKDTO;
    }
}
