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

import com.qsoft.rs.sincoar.dto.TsafepasswordPKDTO;
import com.qsoft.rs.sincoar.model.TsafepasswordPK;
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 TsafepasswordPKMapperImpl implements TsafepasswordPKMapper {

    @Override
    public TsafepasswordPK getEntidad(TsafepasswordPKDTO tsafepasswordPK) {
        if ( tsafepasswordPK == null ) {
            return null;
        }

        TsafepasswordPK tsafepasswordPK1 = new TsafepasswordPK();

        if ( tsafepasswordPK.getCompanycode() != null ) {
            tsafepasswordPK1.setCompanycode( tsafepasswordPK.getCompanycode() );
        }
        tsafepasswordPK1.setChannelcode( tsafepasswordPK.getChannelcode() );

        return tsafepasswordPK1;
    }

    @Override
    public TsafepasswordPKDTO getDto(TsafepasswordPK tsafepasswordPK) {
        if ( tsafepasswordPK == null ) {
            return null;
        }

        TsafepasswordPKDTO tsafepasswordPKDTO = new TsafepasswordPKDTO();

        tsafepasswordPKDTO.setCompanycode( (int) tsafepasswordPK.getCompanycode() );
        tsafepasswordPKDTO.setChannelcode( tsafepasswordPK.getChannelcode() );

        return tsafepasswordPKDTO;
    }
}
