Develop > Persistence layer > Data assets > Work with the Data load utility > Customize the data load utility


Create custom data load business object mediators

Occasionally the default business objects provided with WebSphere Commerce are insufficient to describe the types of data used in certain businesses, making it is necessary to extend or create new business objects. If you have created custom business objects, then we will need to create a custom business object mediator in order for the data load utility to understand them.


Before you begin

Ensure that you understand the following information:

To create a custom data load business object mediator, extend the AbstractBusinessObjectMediator abstract class, which is the default implementation of the BusinessObjectMediator interface.


Procedure

  1. Open WebSphere Commerce Developer.

  2. Implement the transform() abstract method to transform the custom business objects into a list of physical objects using the TableDataObject class.

  3. Optional: Override the other methods in the class as necessary to achieve the required functionality to mediate the existing data.

  4. Open the sample business object configuration file located in the WCDE_INSTALL\samples\DataLoad directory.

  5. Change the value of the className attribute inside the <_config:BusinessObjectMediator> element with the class name of the customized mediator.

  6. Save and close the file.

  7. Repeat steps 5 and 6 for each of the business object configuration files.


Related tasks

Load extension tables

Create custom data readers

Configure the CSV data reader

Configure the business object configuration file


+

Search Tips   |   Advanced Search