WCS | Custom Dataload | Catalog Group Dataload | BOD Objects to Set in Custom Data Reader

If you are writing custom datareader for Catgroup Dataload, here is the sample snippet for different BOD Objects to set,

// Catalog Group Details
CatalogGroupExternalIdentifierType catGroupExternalIdentifierType = CommerceFoundationFactory.eINSTANCE.createCatalogGroupExternalIdentifierType();
catGroupExternalIdentifierType.setGroupIdentifier("shoes")

CatalogGroupIdentifierType catGroupIdentifierType = CommerceFoundationFactory.eINSTANCE.createCatalogGroupIdentifierType();
catGroupIdentifierType.setExternalIdentifier(catGroupExternalIdentifierType);
       
// Catalog Group Parent Details
CatalogGroupExternalIdentifierType catGroupParentExternalIdentifierType = CommerceFoundationFactory.eINSTANCE.createCatalogGroupExternalIdentifierType();
catGroupParentExternalIdentifierType.setGroupIdentifier("footwear")

CatalogGroupIdentifierType catGroupParentIdentifierType = CommerceFoundationFactory.eINSTANCE.createCatalogGroupIdentifierType();
catGroupParentIdentifierType.setExternalIdentifier(catGroupParentExternalIdentifierType);
       
// Catalog Group Description Details       
CatalogDescriptionType catalogDescType = CatalogFactory.eINSTANCE.createCatalogDescriptionType();
catalogDescType.setLanguage("-1");
catalogDescType.setName("Shoes");       

// Setting Details to CatalogGroupType
CatalogGroupType catGroupType = CatalogFactory.eINSTANCE.createCatalogGroupType();
catGroupType.setCatalogGroupIdentifier(catalogGroupIdentifierType);
catGroupType.setParentCatalogGroupIdentifier(catGroupParentIdentifierType);               
catGroupType.getDescription().add(catalogDescriptionType);
catGroupType.setTopCatalogGroup(false);

Set this prepared CatalogGroupType to  DataLoadBusinessObject and return the same in next() method for the Custom Data Reader.

Refer http://yashodtechtalk.blogspot.in/2013/11/wcs-dataload-utility-writing-custom.html link to know more details of custom data readers

No comments:

Post a Comment

My Writings........

HCL Commerce v9.1 | Local Store Vs Remote Store

  Local Store Remote Store Project Type Migrated (Lift & Shift) - Newly Imp...