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

import com.qsoft.rs.sincoar.dto.TcustpeopleincomePKDTO;
import com.qsoft.rs.sincoar.model.TcustpeopleincomePK;
import javax.annotation.processing.Generated;

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

    @Override
    public TcustpeopleincomePK getEntidad(TcustpeopleincomePKDTO tcustpeopleincomePK) {
        if ( tcustpeopleincomePK == null ) {
            return null;
        }

        TcustpeopleincomePK tcustpeopleincomePK1 = new TcustpeopleincomePK();

        if ( tcustpeopleincomePK.getPersoncode() != null ) {
            tcustpeopleincomePK1.setPersoncode( tcustpeopleincomePK.getPersoncode() );
        }
        tcustpeopleincomePK1.setDateto( tcustpeopleincomePK.getDateto() );
        if ( tcustpeopleincomePK.getIncomesequence() != null ) {
            tcustpeopleincomePK1.setIncomesequence( tcustpeopleincomePK.getIncomesequence().shortValue() );
        }

        return tcustpeopleincomePK1;
    }

    @Override
    public TcustpeopleincomePKDTO getDto(TcustpeopleincomePK tcustpeopleincomePK) {
        if ( tcustpeopleincomePK == null ) {
            return null;
        }

        TcustpeopleincomePKDTO tcustpeopleincomePKDTO = new TcustpeopleincomePKDTO();

        tcustpeopleincomePKDTO.setPersoncode( (int) tcustpeopleincomePK.getPersoncode() );
        tcustpeopleincomePKDTO.setDateto( tcustpeopleincomePK.getDateto() );
        tcustpeopleincomePKDTO.setIncomesequence( (int) tcustpeopleincomePK.getIncomesequence() );

        return tcustpeopleincomePKDTO;
    }
}
