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

import com.qsoft.rs.sincoar.dto.TgeneparametersPKDTO;
import com.qsoft.rs.sincoar.model.TgeneparametersPK;
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 TgeneparametersPKMapperImpl implements TgeneparametersPKMapper {

    @Override
    public TgeneparametersPK getEntidad(TgeneparametersPKDTO tgeneparametersPK) {
        if ( tgeneparametersPK == null ) {
            return null;
        }

        TgeneparametersPK tgeneparametersPK1 = new TgeneparametersPK();

        tgeneparametersPK1.setCode( tgeneparametersPK.getCode() );
        if ( tgeneparametersPK.getCompanycode() != null ) {
            tgeneparametersPK1.setCompanycode( tgeneparametersPK.getCompanycode() );
        }

        return tgeneparametersPK1;
    }

    @Override
    public TgeneparametersPKDTO getDto(TgeneparametersPK tgeneparametersPK) {
        if ( tgeneparametersPK == null ) {
            return null;
        }

        TgeneparametersPKDTO tgeneparametersPKDTO = new TgeneparametersPKDTO();

        tgeneparametersPKDTO.setCode( tgeneparametersPK.getCode() );
        tgeneparametersPKDTO.setCompanycode( (int) tgeneparametersPK.getCompanycode() );

        return tgeneparametersPKDTO;
    }
}
