当前位置: 首页>>代码示例>>Java>>正文


Java BusinessObjectService.findMatching方法代码示例

本文整理汇总了Java中org.kuali.rice.krad.service.BusinessObjectService.findMatching方法的典型用法代码示例。如果您正苦于以下问题:Java BusinessObjectService.findMatching方法的具体用法?Java BusinessObjectService.findMatching怎么用?Java BusinessObjectService.findMatching使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.krad.service.BusinessObjectService的用法示例。


在下文中一共展示了BusinessObjectService.findMatching方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: verifyChartUnitSubUnitIsUnique

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
/**
 * Verifies that the chart/unit/sub-unit combination on this customer profile is unique
 * @param customerProfile the customer profile to check
 * @return true if the chart/unit/sub-unit is unique, false otherwise
 */
protected boolean verifyChartUnitSubUnitIsUnique(CustomerProfile customerProfile) {
    boolean result = true;

    if (!StringUtils.isBlank(customerProfile.getChartCode()) && !StringUtils.isBlank(customerProfile.getUnitCode()) && !StringUtils.isBlank(customerProfile.getSubUnitCode())) {
        final BusinessObjectService businessObjectService = SpringContext.getBean(BusinessObjectService.class);
        Map<String, Object> searchKeys = new HashMap<String, Object>();
        searchKeys.put(PdpPropertyConstants.CustomerProfile.CUSTOMER_PROFILE_CHART_CODE, customerProfile.getChartCode());
        searchKeys.put(PdpPropertyConstants.CustomerProfile.CUSTOMER_PROFILE_UNIT_CODE, customerProfile.getUnitCode());
        searchKeys.put(PdpPropertyConstants.CustomerProfile.CUSTOMER_PROFILE_SUB_UNIT_CODE, customerProfile.getSubUnitCode());

        final Collection foundCustomerProfiles = businessObjectService.findMatching(CustomerProfile.class, searchKeys);
        if (foundCustomerProfiles != null && foundCustomerProfiles.size() > 0) {
            result = false;
            putFieldError(PdpPropertyConstants.CustomerProfile.CUSTOMER_PROFILE_UNIT_CODE, PdpKeyConstants.ERROR_CUSTOMER_PROFILE_CHART_UNIT_SUB_UNIT_NOT_UNIQUE, new String[] { customerProfile.getChartCode(), customerProfile.getUnitCode(), customerProfile.getSubUnitCode()});
        }
    }

    return result;
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:25,代码来源:CustomerProfileRule.java

示例2: testCreateProfileAttributeBo

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
@Test
@Transactional
public void testCreateProfileAttributeBo() throws Exception {
    BusinessObjectService businessObjectService = KRADServiceLocator.getBusinessObjectService();
    ProfileAttributeBo profileAttributeBo = new ProfileAttributeBo();
    profileAttributeBo.setAgendaName("mock_agenda");
    profileAttributeBo.setAttributeName("mock_attribute");
    profileAttributeBo.setAttributeValue("mock_value");
    businessObjectService.save(Arrays.asList(profileAttributeBo));

    HashMap map = new HashMap();
    map.put("agenda_name", "mock_agenda");
    List<ProfileAttributeBo> matching = (List<ProfileAttributeBo>) businessObjectService.findMatching(ProfileAttributeBo.class, map);
    assertNotNull(matching);
    assertTrue(!matching.isEmpty());
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:17,代码来源:ProfileAttributeBo_IT.java

示例3: getGloballyProtectedFieldsModificationList

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
@Override
public List getGloballyProtectedFieldsModificationList() throws Exception {
    List fieldList = new ArrayList<String>();
    StringBuffer fields = null;
    String tagField = null;
    String firstIndicator = null;
    String secondIndicator = null;
    String subField = null;
    Map<String, String> criteria = new HashMap<String, String>();
    criteria.put("modifyFlag","false");
    BusinessObjectService businessObjectService = KRADServiceLocator.getBusinessObjectService();
    List<OleGloballyProtectedField> protectedFieldList = (List<OleGloballyProtectedField>)businessObjectService.findMatching(OleGloballyProtectedField.class,criteria);
    for(OleGloballyProtectedField oleGloballyProtectedField : protectedFieldList){
        //if(!oleGloballyProtectedField.isModifyFlag()){
            tagField = oleGloballyProtectedField.getTag();
            firstIndicator = oleGloballyProtectedField.getFirstIndicator()!=null?"-"+ oleGloballyProtectedField.getFirstIndicator():"-";
            secondIndicator = oleGloballyProtectedField.getSecondIndicator()!=null?"-"+ oleGloballyProtectedField.getSecondIndicator():"-";
            subField = oleGloballyProtectedField.getSubField()!=null?"-"+ oleGloballyProtectedField.getSubField():"-";
            fields = new StringBuffer();
            fields = fields.append(tagField).append(firstIndicator).append(secondIndicator).append(subField);
            fieldList.add(fields.toString());
        //}
    }

    return fieldList;
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:27,代码来源:OverlayRetrivalServiceImpl.java

示例4: transferInstances

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
public void transferInstances(List<RequestDocument> requestDocuments, BusinessObjectService businessObjectService)
        throws Exception {
    LOG.debug("RdbmsWorkInstanceDocumentManager transferInstances");
    Collection<InstanceRecord> instanceRecords = null;
    String desBibIdentifier = requestDocuments.get(requestDocuments.size() - 1).getUuid();
    LOG.debug("RdbmsWorkInstanceDocumentManager transferInstances desBibIdentifier " + desBibIdentifier);
    Map instanceMap = new HashMap();
    Map bibInstanceMap = new HashMap();
    for (int i = 0; i < requestDocuments.size() - 1; i++) {
        RequestDocument requestDocument = requestDocuments.get(i);
        instanceMap.put("instanceId", DocumentUniqueIDPrefix.getDocumentId(requestDocument.getUuid()));
        bibInstanceMap.put("instanceId", DocumentUniqueIDPrefix.getDocumentId(requestDocument.getUuid()));
        List<BibInstanceRecord> bibInstanceRecordList = (List<BibInstanceRecord>) businessObjectService
                .findMatching(BibInstanceRecord.class, bibInstanceMap);
        if (bibInstanceRecordList.size() > 1) {
            //Instances are associated with multiple bibs means it has bound with with other bib. So we cant transfer. So throw exception
            LOG.error(requestDocument.getUuid() + " is bounded with other bib and cant be transferred");
            throw new Exception(requestDocument.getUuid() + " is bounded with other bib and cant be transferred");
        }
        //else {
        //    BibInstanceRecord bibInstanceRecord = bibInstanceRecordList.get(0);
        //    bibInstanceRecord.setBibId(DocumentUniqueIDPrefix.getDocumentId(desBibIdentifier));
        //    businessObjectService.save(bibInstanceRecord);
        //}
        InstanceRecord instanceRecord = businessObjectService.findByPrimaryKey(InstanceRecord.class, instanceMap);
        instanceRecord.setBibId(DocumentUniqueIDPrefix.getDocumentId(desBibIdentifier));
        businessObjectService.save(instanceRecord);
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:30,代码来源:RdbmsWorkInstanceDocumentManager.java

示例5: getTemplate

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
public String getTemplate() {

        BusinessObjectService businessObjectService = KRADServiceLocator.getBusinessObjectService();
        Map<String, String> criteriaMap = new HashMap<String, String>();
        criteriaMap.put("namespaceCode", "OLE-PRNT");
        criteriaMap.put("componentCode", "Print Template");
        List<ParameterBo> parametersList = (List<ParameterBo>) businessObjectService.findMatching(ParameterBo.class, criteriaMap);
        return parametersList.get(0).getValue();

    }
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:11,代码来源:PrintBill.java

示例6: deleteDocs

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
@Override
public void deleteDocs(RequestDocument requestDocument, Object object) {

    ResponseDocument responseDocument = new ResponseDocument();
    BusinessObjectService businessObjectService = (BusinessObjectService) object;
    //ItemRecord itemRecord = new ItemRecord();
    String itemId = DocumentUniqueIDPrefix.getDocumentId(requestDocument.getUuid());
    Map itemMap = new HashMap();
    itemMap.put("itemId", itemId);
    List<ItemRecord> itemRecords = (List<ItemRecord>) businessObjectService.findMatching(ItemRecord.class, itemMap);
    if (itemRecords != null && itemRecords.size() > 0) {
        ItemRecord itemRecord = itemRecords.get(0);
        if (itemRecord.getFormerIdentifierRecords() != null && itemRecord.getFormerIdentifierRecords().size() > 0) {
            List<FormerIdentifierRecord> formerIdentifierRecords = itemRecord.getFormerIdentifierRecords();
            businessObjectService.delete(formerIdentifierRecords);
        }


        if (itemRecord.getItemNoteRecords() != null && itemRecord.getItemNoteRecords().size() > 0) {
            List<ItemNoteRecord> itemNoteRecords = itemRecord.getItemNoteRecords();
            businessObjectService.delete(itemNoteRecords);
        }


        if (itemRecord.getLocationsCheckinCountRecords() != null && itemRecord.getLocationsCheckinCountRecords().size() > 0) {
            List<LocationsCheckinCountRecord> locationsCheckinCountRecords = itemRecord.getLocationsCheckinCountRecords();
            businessObjectService.delete(locationsCheckinCountRecords);
        }
        itemRecord.setItemStatusId(null);
        itemRecord.setItemTypeId(null);
        itemRecord.setTempItemTypeId(null);
        itemRecord.setStatisticalSearchId(null);
        itemRecord.setHighDensityStorageId(null);
        businessObjectService.delete(itemRecord);
        buildResponseDocument(requestDocument, itemRecord, responseDocument);
    }

}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:39,代码来源:RdbmsWorkItemDocumentManager.java

示例7: retrieveBlockingOffsetDefinitions

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
/**
 * Retrieves all Offset Definitions blocking the given object code and puts them in the List of additional blocking objects
 * @param objectCode the object code to find additional blocking objects for
 * @param additionalBlockingObjects the List of additional blocking objects to populate
 */
protected void retrieveBlockingOffsetDefinitions(ObjectCode objectCode, List<BusinessObject> additionalBlockingObjects) {
    final BusinessObjectService businessObjectService = SpringContext.getBean(BusinessObjectService.class);

    Map<String, Object> keys = new HashMap<String, Object>();
    keys.put("universityFiscalYear", objectCode.getUniversityFiscalYear());
    keys.put("chartOfAccountsCode", objectCode.getChartOfAccountsCode());
    keys.put("financialObjectCode", objectCode.getFinancialObjectCode());

    Collection<OffsetDefinition> offsetDefinitions = businessObjectService.findMatching(OffsetDefinition.class, keys);
    if (offsetDefinitions != null && !offsetDefinitions.isEmpty()) {
        additionalBlockingObjects.addAll(offsetDefinitions);
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:19,代码来源:ObjectCodeGlobalRule.java

示例8: initProfileDetailsForInvoiceImport

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
public static List<KeyValue> initProfileDetailsForInvoiceImport() {

        List<KeyValue> keyValues = new ArrayList<KeyValue>();
        BusinessObjectService businessObjectService = KRADServiceLocator.getBusinessObjectService();
        Map parentCriteria1 = new HashMap();
        parentCriteria1.put("batchProcessProfileType", "Invoice Import");
        List<OLEBatchProcessProfileBo> oleBatchProcessProfileBo = (List<OLEBatchProcessProfileBo>) businessObjectService.findMatching(OLEBatchProcessProfileBo.class, parentCriteria1);
        keyValues.add(new ConcreteKeyValue("", ""));
        for (OLEBatchProcessProfileBo profileBo : oleBatchProcessProfileBo) {
            keyValues.add(new ConcreteKeyValue(profileBo.getBatchProcessProfileName(),profileBo.getBatchProcessProfileId()));
        }
        return keyValues;
    }
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:14,代码来源:OLEBatchProcessInvoiceImportProfileValueFinder.java

示例9: populatePrintFontMap

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
public void populatePrintFontMap() {
    BusinessObjectService businessObjectService = KRADServiceLocator.getBusinessObjectService();
    Map<String, String> criteriaMap = new HashMap<String, String>();
    criteriaMap.put("namespaceCode", "OLE-PRNT");
    criteriaMap.put("componentCode", "Patron Bill Font");
    List<ParameterBo> parametersList = (List<ParameterBo>) businessObjectService.findMatching(ParameterBo.class, criteriaMap);
    for (int i = 0; i < parametersList.size(); i++) {
        printFontMap.put(parametersList.get(i).getName(), fontMap.get(parametersList.get(i).getValue()));
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:11,代码来源:PrintBill.java

示例10: getIntervalForCourtesyNotice

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
public String getIntervalForCourtesyNotice() {
    BusinessObjectService businessObjectService = KRADServiceLocator.getBusinessObjectService();
    Map<String, String> criteriaMap = new HashMap<String, String>();
    criteriaMap.put(OLEConstants.NAMESPACE_CODE, OLEConstants.DLVR_NMSPC);
    criteriaMap.put(OLEConstants.COMPONENT_CODE, OLEConstants.DLVR_CMPNT);
    criteriaMap.put(OLEConstants.NAME, OLEParameterConstants.COURTESY_NOTICE_INTER);
    List<ParameterBo> parametersList = (List<ParameterBo>) businessObjectService.findMatching(ParameterBo.class, criteriaMap);
    return parametersList.get(0).getValue();
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:10,代码来源:OLEASRPlaceRequestHelperServiceImpl.java

示例11: getIntervalForOverdueNotice

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
public String getIntervalForOverdueNotice() {
    BusinessObjectService businessObjectService = KRADServiceLocator.getBusinessObjectService();
    Map<String, String> criteriaMap = new HashMap<String, String>();
    criteriaMap.put(OLEConstants.NAMESPACE_CODE, OLEConstants.DLVR_NMSPC);
    criteriaMap.put(OLEConstants.COMPONENT_CODE, OLEConstants.DLVR_CMPNT);
    criteriaMap.put(OLEConstants.NAME, OLEConstants.OVERDUE_NOTICE_INTER);
    List<ParameterBo> parametersList = (List<ParameterBo>) businessObjectService.findMatching(ParameterBo.class, criteriaMap);
    return parametersList.get(0).getValue();
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:10,代码来源:OLEASRPlaceRequestHelperServiceImpl.java

示例12: initProfileDetailsForClaimReport

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
public static List<KeyValue> initProfileDetailsForClaimReport() {

        List<KeyValue> keyValues = new ArrayList<KeyValue>();
        BusinessObjectService businessObjectService = KRADServiceLocator.getBusinessObjectService();
        Map parentCriteria1 = new HashMap();
        parentCriteria1.put("batchProcessProfileType", "Claim Report");
        List<OLEBatchProcessProfileBo> oleBatchProcessProfileBo = (List<OLEBatchProcessProfileBo>) businessObjectService.findMatching(OLEBatchProcessProfileBo.class, parentCriteria1);
        keyValues.add(new ConcreteKeyValue("", ""));
        for (OLEBatchProcessProfileBo profileBo : oleBatchProcessProfileBo) {
            keyValues.add(new ConcreteKeyValue(profileBo.getBatchProcessProfileName(), profileBo.getBatchProcessProfileId()));
        }
        return keyValues;
    }
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:14,代码来源:OLEBatchProcessClaimImportProfileValueFinder.java

示例13: getOleBudgetCode

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
@Override
public OleBudgetCode getOleBudgetCode(String inputValue)throws Exception{
    BusinessObjectService businessObjectService = KRADServiceLocator.getBusinessObjectService();
    Map<String,String> criteriaMap = new HashMap<String,String>();
    criteriaMap.put(OLEConstants.OVERLAY_INPUTVALUE,inputValue);
    List<OleBudgetCode> oleBudgetCodeList = (List<OleBudgetCode>) businessObjectService.findMatching(OleBudgetCode.class,criteriaMap);
    if(oleBudgetCodeList!=null && oleBudgetCodeList.size()>0){
        return oleBudgetCodeList.iterator().next();
    }else{
        return null;
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:13,代码来源:OverlayRetrivalServiceImpl.java

示例14: setHostProfile

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
/**
 *
 * @param hostProfile
 */
public void setHostProfile(TemProfile hostProfile) {
    this.hostProfile = hostProfile;
    if (hostProfile != null) {
        TravelerService service = (TravelerService) SpringContext.getService("travelerService");
        service.populateTemProfile(hostProfile);
        if (hostProfile.getTravelerType() == null) {
            BusinessObjectService boService = (BusinessObjectService) SpringContext.getService("businessObjectService");
            Map<String, Object> fieldValues = new HashMap<String, Object>();
            fieldValues.put("code", hostProfile.getTravelerTypeCode());
            List<TravelerType> types = (List<TravelerType>) boService.findMatching(TravelerType.class, fieldValues);
            hostProfile.setTravelerType(types.get(0));
        }
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:19,代码来源:TravelEntertainmentDocument.java

示例15: checkItemExistsInOleForBibs

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
public String checkItemExistsInOleForBibs(List<String> bibIds) throws Exception {
    boolean itemCheck = false;
    BusinessObjectService boService = KRADServiceLocator.getBusinessObjectService();
    for (String bibId : bibIds) {
        Map<String, String> map = new HashMap<>();
        map.put(OLEConstants.BIB_ID, bibId);
        List<OleCopy> listOfValues = (List<OleCopy>) boService.findMatching(OleCopy.class, map);
        if (listOfValues.size() != 0) {
            itemCheck = true;
            GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, OLEConstants.DELETE_PURCHASE_ORDER_FAIL_MESSAGE, "Item");
        } else {
            List<String> itemList = getItemsForBib(bibId);
            for (String itemUuid : itemList) {
                Map<String, String> uuidMap = new HashMap<>();
                uuidMap.put("itemUuid", itemUuid);
                List<OleLoanDocument> oleLoanDocuments = (List<OleLoanDocument>) boService.findMatching(OleLoanDocument.class, uuidMap);
                if (oleLoanDocuments.size() != 0) {
                    itemCheck = true;
                    GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, OLEConstants.DELETE_LOANED_FAIL_MESSAGE);
                    break;
                } else {
                    List<OleDeliverRequestBo> oleDeliverRequestBos = (List<OleDeliverRequestBo>) boService.findMatching(OleDeliverRequestBo.class, uuidMap);
                    if (oleDeliverRequestBos.size() != 0) {
                        itemCheck = true;
                        GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, OLEConstants.DELETE_REQUEST_FAIL_MESSAGE);
                        break;
                    }
                }
            }
        }
    }
    if (!itemCheck) {
        return "success";
    }
    return "Failed";
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:37,代码来源:TransferUtil.java


注:本文中的org.kuali.rice.krad.service.BusinessObjectService.findMatching方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。