<commit_before>package org.kuali.kfs.sys.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.kuali.kfs.krad.service.BusinessObjectService;
import org.kuali.kfs.krad.util.ObjectUtils;
import org.kuali.kfs.pdp.PdpPropertyConstants;
import org.kuali.kfs.pdp.businessobject.PayeeACHAccount;
import org.kuali.kfs.sys.service.PayeeACHService;

public class PayeeACHServiceImpl implements PayeeACHService {
	
	private BusinessObjectService businessObjectService;
	
	@Override
	public boolean isPayeeSignedUpForACH(String payeeTypeCode, String payeeIdNumber) {

		Map<String, String> keys = new HashMap<String, String>();
	    keys.put(PdpPropertyConstants.PAYEE_IDENTIFIER_TYPE_CODE, payeeTypeCode);
	    keys.put(PdpPropertyConstants.PAYEE_ID_NUMBER, payeeIdNumber);
	    List<PayeeACHAccount> payeeACHAccountList = (List<PayeeACHAccount>)businessObjectService.findMatching(PayeeACHAccount.class, keys);
	    
	    if(ObjectUtils.isNull(payeeACHAccountList) || payeeACHAccountList.isEmpty())
	    	return false;
	    
	    return true;
    }
	
    public void setBusinessObjectService(BusinessObjectService businessObjectService) {
        this.businessObjectService = businessObjectService;
    }

}<commit_msg>KFSCD-58 Check active Payee ACH accounts only<commit_after>package org.kuali.kfs.sys.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.kuali.kfs.krad.service.BusinessObjectService;
import org.kuali.kfs.krad.util.ObjectUtils;
import org.kuali.kfs.pdp.PdpPropertyConstants;
import org.kuali.kfs.pdp.businessobject.PayeeACHAccount;
import org.kuali.kfs.sys.KFSPropertyConstants;
import org.kuali.kfs.sys.service.PayeeACHService;

public class PayeeACHServiceImpl implements PayeeACHService {
	
	private BusinessObjectService businessObjectService;
	
	@Override
	public boolean isPayeeSignedUpForACH(String payeeTypeCode, String payeeIdNumber) {

		Map<String, Object> keys = new HashMap<String, Object>();
	    keys.put(PdpPropertyConstants.PAYEE_IDENTIFIER_TYPE_CODE, payeeTypeCode);
	    keys.put(PdpPropertyConstants.PAYEE_ID_NUMBER, payeeIdNumber);
	    keys.put(KFSPropertyConstants.ACCOUNT_ACTIVE_INDICATOR, Boolean.TRUE);
	    List<PayeeACHAccount> payeeACHAccountList = (List<PayeeACHAccount>)businessObjectService.findMatching(PayeeACHAccount.class, keys);
	    
	    if(ObjectUtils.isNull(payeeACHAccountList) || payeeACHAccountList.isEmpty())
	    	return false;
	    
	    return true;
    }
	
    public void setBusinessObjectService(BusinessObjectService businessObjectService) {
        this.businessObjectService = businessObjectService;
    }

}
{'fraction_non_alphanumeric': 0.08762692741632193, 'fraction_numerical': 0.000752162467092892, 'mean_word_length': 5.551724137931035, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '832814', 'n_tokens_mistral': 880, 'n_tokens_neox': 868, 'n_words': 128}