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


Java BusinessObjectService.delete方法代码示例

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


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

示例1: 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

示例2: removePreviousYearObjectCodes

import org.kuali.rice.krad.service.BusinessObjectService; //导入方法依赖的package包/类
/**
 * Deletes all of the object codes saved to make this test work
 * @param objectCodesToDelete the object codes to remove
 */
public static void removePreviousYearObjectCodes(Set<String> objectCodesToDelete) {
    final BusinessObjectService boService = SpringContext.getBean(BusinessObjectService.class);
    for (String objectCodeRepresenation : objectCodesToDelete) {
        final ObjectCode objectCode = retrieveObjectCodeFromRepresentation(objectCodeRepresenation);
        boService.delete(objectCode);
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:12,代码来源:YearEndObjectCodePersistenceUtils.java

示例3: 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;
    InstanceRecord instanceRecord = new InstanceRecord();
    Map instanceMap = new HashMap();
    instanceMap.put("instanceId", DocumentUniqueIDPrefix.getDocumentId(requestDocument.getUuid()));
    List<InstanceRecord> instanceRecords = (List<InstanceRecord>) businessObjectService.findMatching(InstanceRecord.class, instanceMap);
    if (instanceRecords != null && instanceRecords.size() > 0) {
        instanceRecord = instanceRecords.get(0);
        if (instanceRecord.getHoldingsRecords() != null && instanceRecord.getHoldingsRecords().size() > 0) {
            HoldingsRecord holdingsRecord = instanceRecord.getHoldingsRecords().get(0);

            if (holdingsRecord.getExtentOfOwnerShipRecords() != null && holdingsRecord.getExtentOfOwnerShipRecords().size() > 0) {
                List<ExtentOfOwnerShipRecord> extentOfOwnerShipRecords = holdingsRecord.getExtentOfOwnerShipRecords();
                for (int i = 0; i < extentOfOwnerShipRecords.size(); i++) {
                    List<ExtentNoteRecord> extentNoteRecords = extentOfOwnerShipRecords.get(i).getExtentNoteRecords();
                    if (extentNoteRecords != null && extentNoteRecords.size() > 0) {
                        businessObjectService.delete(extentNoteRecords);
                    }
                }
                businessObjectService.delete(extentOfOwnerShipRecords);
            }


            if (holdingsRecord.getHoldingsNoteRecords() != null && holdingsRecord.getHoldingsNoteRecords().size() > 0) {
                List<HoldingsNoteRecord> holdingsNoteRecords = holdingsRecord.getHoldingsNoteRecords();
                businessObjectService.delete(holdingsNoteRecords);
            }

           /* if (holdingsRecord.getAccessUriRecords() != null && holdingsRecord.getAccessUriRecords().size() > 0) {
                List<AccessUriRecord> accessUriRecords = holdingsRecord.getAccessUriRecords();
                businessObjectService.delete(accessUriRecords);
            }*/
            holdingsRecord.setCallNumberTypeId(null);
            holdingsRecord.setReceiptStatusId(null);

            businessObjectService.delete(holdingsRecord);
        }

        List<ItemRecord> itemRecords = instanceRecord.getItemRecords();
        for (ItemRecord itemRecord : itemRecords) {

            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);
            }
            if (itemRecord.getDonorList() != null && itemRecord.getDonorList().size() > 0) {
                List<OLEItemDonorRecord> donorList = itemRecord.getDonorList();
                businessObjectService.delete(donorList);
            }
            itemRecord.setItemStatusId(null);
            itemRecord.setItemTypeId(null);
            itemRecord.setTempItemTypeId(null);
            itemRecord.setStatisticalSearchId(null);
            itemRecord.setHighDensityStorageId(null);
            businessObjectService.delete(itemRecord);

        }
        businessObjectService.delete(instanceRecord);

    }
    buildResponseDocument(requestDocument, instanceRecord, responseDocument);

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

示例4: 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;
    BibRecord bibRecord = new BibRecord();
    Map map = new HashMap();
    map.put("bibId", DocumentUniqueIDPrefix.getDocumentId(requestDocument.getUuid()));
    List<BibRecord> bibRecords = (List<BibRecord>) businessObjectService.findMatching(BibRecord.class, map);
    if (bibRecords != null && bibRecords.size() > 0) {
        bibRecord = bibRecords.get(0);
      //  if (bibRecord.getInstanceRecords() != null && bibRecord.getInstanceRecords().size() > 0) {
            InstanceRecord instanceRecord = new InstanceRecord();
            List<InstanceRecord> instanceRecords = null;//(List<InstanceRecord>) bibRecord.getInstanceRecords();
            if (instanceRecords != null && instanceRecords.size() > 0) {
                for (int i = 0; i < instanceRecords.size(); i++) {
                    instanceRecord = instanceRecords.get(i);
                    if (instanceRecord.getHoldingsRecords() != null && instanceRecord.getHoldingsRecords().size() > 0) {
                        HoldingsRecord holdingsRecord = instanceRecord.getHoldingsRecords().get(0);

                        if (holdingsRecord.getExtentOfOwnerShipRecords() != null && holdingsRecord.getExtentOfOwnerShipRecords().size() > 0) {
                            List<ExtentOfOwnerShipRecord> extentOfOwnerShipRecords = holdingsRecord.getExtentOfOwnerShipRecords();
                            for (int j = 0; j < extentOfOwnerShipRecords.size(); j++) {
                                List<ExtentNoteRecord> extentNoteRecords = extentOfOwnerShipRecords.get(j).getExtentNoteRecords();
                                if (extentNoteRecords != null && extentNoteRecords.size() > 0) {
                                    businessObjectService.delete(extentNoteRecords);
                                }
                            }
                            businessObjectService.delete(extentOfOwnerShipRecords);
                        }
                        if (holdingsRecord.getHoldingsNoteRecords() != null && holdingsRecord.getHoldingsNoteRecords().size() > 0) {
                            List<HoldingsNoteRecord> holdingsNoteRecords = holdingsRecord.getHoldingsNoteRecords();
                            businessObjectService.delete(holdingsNoteRecords);
                        }

                        /*if (holdingsRecord.getAccessUriRecords() != null && holdingsRecord.getAccessUriRecords().size() > 0) {
                            List<AccessUriRecord> accessUriRecords = holdingsRecord.getAccessUriRecords();
                            businessObjectService.delete(accessUriRecords);
                        }*/
                        holdingsRecord.setCallNumberTypeId(null);
                        holdingsRecord.setReceiptStatusId(null);
                        businessObjectService.delete(holdingsRecord);
                    }
                    List<ItemRecord> itemRecords = instanceRecord.getItemRecords();
                    for (ItemRecord itemRecord : itemRecords) {
                        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);

                    }
                    businessObjectService.delete(instanceRecord);
                }
            }
       // }
    }
    businessObjectService.delete(bibRecord);
    //requestDocument.setUuid(bibRecord.getBibId());
    buildResponseDocument(requestDocument, bibRecord, responseDocument);
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:74,代码来源:RdbmsWorkBibDocumentManager.java


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