Posts

Showing posts from August, 2013

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);             }