SDO usage example

Here's a sample of using SDO framework in WCS BOD controller commands. For update use-cases, one will use ChangeBusinessObjectMediator instead of ReadBusinessObjectMediator. Hope you'll find it useful.

SelectionCriteria aCriteria = new SelectionCriteria("{_wcf.ap='
IBM_Admin_CatalogEntryAttributes'}/CatalogEntry[CatalogEntryIdentifier[(UniqueID='11545')]]", "com.ibm.commerce.catalog");
            ReadBusinessObjectMediator bom = DataServiceFacade.getInstance("com.ibm.commerce.catalog").getReadNounMediator(aCriteria);
           
            Iterator iter1 = ((CatalogEntryType)bom.getNouns().get(0)).getCatalogEntryAttributes().getIterator();
            while (iter1.hasNext()) {
                CatalogEntryAttributesType attr = (CatalogEntryAttributesType) iter1.next();
                System.out.println("attribute: " + attr);

            }

Comments

Popular posts from this blog

GNU Emacs as a Comic Book Reader

Data Visualization with GNU Emacs

Tinylisp and Multi-threaded Emacs