이 인터페이스는 비즈니스 그래프 또는 비즈니스 오브젝트를 작성하는 기능을 제공합니다.
다음 예는 Factory Create 모델의 여러 가지 옵션을 보여줍니다.
BOFactory factoryService = (BOFactory) new ServiceManager().locateService("com/ibm/websphere/bo/BOFactory"); BOType typeService = (BOType) new ServiceManager().locateService("com/ibm/websphere/bo/BOType"); // 1. Use the business object Factory Create model with a target namespace // and a complex type definition name. DataObject productCategory1 = factoryService.create ("http://www.scm.com/ProductCategoryTypes", "ProductCategory"); // 2. Use the business object Factory Create model with the type. DataObject productCategory2 = factoryService.createByType(typeService.getType ("http://www.scm.com/ProductCategoryTypes", "ProductCategory")); // 3. Use the business object Factory Create model with the class. DataObject productCategory3 = factoryService.createByClass (com.scm.pc.model.Product.class); // Use the business graph Factory Create model with a target namespace // and a complex type definition name. // It also automatically creates the ChangeSummary and EventSummary headers. DataObject productCategoryBG = factoryService.create ("http://www.scm.com/ProductCategoryTypes/ProductCategoryBG", "ProductCategoryBG");
다음은 Containment Create 모델의 예입니다.
BOFactory factoryService = (BOFactory) new ServiceManager().locateService("com/ibm/websphere/bo/BOFactory"); // Use the Factory Create model for the top level object. DataObject productCategoryBG = factoryService.create ("http://www.scm.com/ProductCategoryTypes/ProductCategoryBG", "ProductCategoryBG"); // Use the Containment Create model on the contained objects. DataObject productCategory = productCategoryBG.createDataObject ("productCategory"); DataObject product = productCategory.createDataObject("product");
다음은 Factory Create / Containment Attach 모델의 예입니다.
BOFactory factoryService = (BOFactory) new ServiceManager().locateService("com/ibm/websphere/bo/BOFactory"); // Use the Factory Create model on the top level object. DataObject productCategoryBG = factoryService.create ("http://www.scm.com/ProductCategoryTypes/ProductCategoryBG", // Use the Factory Create model on what will eventually become a contained object. DataObject productCategory = factoryService.create ("http://www.scm.com/ProductCategoryTypes", "ProductCategory"); // Containment attach productCategoryBG.setDataObject("productCategory", productCategory);
최종 갱신: 2006년 4월 13일
(c) Copyright IBM Corporation 2005, 2006.
이 Information Center는 Eclipse 기술을 기반으로 합니다. (http://www.eclipse.org 웹 사이트 참조)