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:
- The logical model of the business objects the custom mediator will work with.
- The API for the AbstractBusinessObjectMediator abstract class.
- The API for the BusinessObjectMediator interface.
- The API for the TableDataObject class.
To create a custom data load business object mediator, extend the AbstractBusinessObjectMediator abstract class, which is the default implementation of the BusinessObjectMediator interface.
Procedure
- Open WebSphere Commerce Developer.
- Implement the transform() abstract method to transform the custom business objects into a list of physical objects using the TableDataObject class.
- Optional: Override the other methods in the class as necessary to achieve the required functionality to mediate the existing data.
- Open the sample business object configuration file located in the WCDE_INSTALL\samples\DataLoad directory.
- Change the value of the className attribute inside the <_config:BusinessObjectMediator> element with the class name of the customized mediator.
- Save and close the file.
- Repeat steps 5 and 6 for each of the business object configuration files.
Related tasks
Configure the business object configuration file