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

import com.qsoft.rs.sincoar.dto.TcustpeopleassociationPKDTO;
import com.qsoft.rs.sincoar.model.TcustpeopleassociationPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TcustpeopleassociationPK getEntidad(TcustpeopleassociationPKDTO tcustpeopleassociationPK) {
        if ( tcustpeopleassociationPK == null ) {
            return null;
        }

        TcustpeopleassociationPK tcustpeopleassociationPK1 = new TcustpeopleassociationPK();

        if ( tcustpeopleassociationPK.getPersoncode() != null ) {
            tcustpeopleassociationPK1.setPersoncode( tcustpeopleassociationPK.getPersoncode() );
        }
        tcustpeopleassociationPK1.setDateto( tcustpeopleassociationPK.getDateto() );
        if ( tcustpeopleassociationPK.getAssociationsequence() != null ) {
            tcustpeopleassociationPK1.setAssociationsequence( tcustpeopleassociationPK.getAssociationsequence().shortValue() );
        }

        return tcustpeopleassociationPK1;
    }

    @Override
    public TcustpeopleassociationPKDTO getDto(TcustpeopleassociationPK tcustpeopleassociationPK) {
        if ( tcustpeopleassociationPK == null ) {
            return null;
        }

        TcustpeopleassociationPKDTO tcustpeopleassociationPKDTO = new TcustpeopleassociationPKDTO();

        tcustpeopleassociationPKDTO.setPersoncode( (int) tcustpeopleassociationPK.getPersoncode() );
        tcustpeopleassociationPKDTO.setDateto( tcustpeopleassociationPK.getDateto() );
        tcustpeopleassociationPKDTO.setAssociationsequence( (int) tcustpeopleassociationPK.getAssociationsequence() );

        return tcustpeopleassociationPKDTO;
    }
}
