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

import com.qsoft.rs.sincoar.dto.TcustpeoplefixedincomePKDTO;
import com.qsoft.rs.sincoar.model.TcustpeoplefixedincomePK;
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 TcustpeoplefixedincomePKMapperImpl implements TcustpeoplefixedincomePKMapper {

    @Override
    public TcustpeoplefixedincomePK getEntidad(TcustpeoplefixedincomePKDTO tcustpeoplefixedincomePK) {
        if ( tcustpeoplefixedincomePK == null ) {
            return null;
        }

        TcustpeoplefixedincomePK tcustpeoplefixedincomePK1 = new TcustpeoplefixedincomePK();

        if ( tcustpeoplefixedincomePK.getPersoncode() != null ) {
            tcustpeoplefixedincomePK1.setPersoncode( tcustpeoplefixedincomePK.getPersoncode() );
        }
        tcustpeoplefixedincomePK1.setDateto( tcustpeoplefixedincomePK.getDateto() );
        if ( tcustpeoplefixedincomePK.getFixedincomesequence() != null ) {
            tcustpeoplefixedincomePK1.setFixedincomesequence( tcustpeoplefixedincomePK.getFixedincomesequence().shortValue() );
        }

        return tcustpeoplefixedincomePK1;
    }

    @Override
    public TcustpeoplefixedincomePKDTO getDto(TcustpeoplefixedincomePK tcustpeoplefixedincomePK) {
        if ( tcustpeoplefixedincomePK == null ) {
            return null;
        }

        TcustpeoplefixedincomePKDTO tcustpeoplefixedincomePKDTO = new TcustpeoplefixedincomePKDTO();

        tcustpeoplefixedincomePKDTO.setPersoncode( (int) tcustpeoplefixedincomePK.getPersoncode() );
        tcustpeoplefixedincomePKDTO.setDateto( tcustpeoplefixedincomePK.getDateto() );
        tcustpeoplefixedincomePKDTO.setFixedincomesequence( (int) tcustpeoplefixedincomePK.getFixedincomesequence() );

        return tcustpeoplefixedincomePKDTO;
    }
}
