
Customizing the physical layer to include the new tables
In this lesson, you update the physical layer by generating object-relational metadata, and generating physical service data objects (SDOs) based on the previously modified schema. To do so, you use the Data Service Layer wizard.
The Data Service Layer wizard generates object-relational metadata and physical data objects for your schema customization. Physical SDOs represent tables in the WebSphere Commerce schema. Each DataObject type corresponds to a table definition in the schema. Each DataObject property corresponds to a table column or a reference to another DataObject type. These references correspond to the foreign key relationships between the database tables.
For each service module, there are object-relational metadata, which map the physical DataObject to a database table. Custom object-relational metadata is stored in the component configuration extension directories and custom physical SDOs are stored inside the WebSphereCommerceServerExtensionsLogic project.
- Creates an extension configuration folder for the Subscription service module if one does not exist. The directory path is at: WC_eardir\xml\config\com.ibm.commerce.subscription-ext
- Generates a custom object-relational metadata file that describes the new custom tables and
relationships. In this tutorial, the metadata file describes the new table XSUBSCRSCHTYPE along with
the SUBSCRIPTION table.
This file is at: WC_eardir\xml\config\com.ibm.commerce.subscription-ext\wc-object-relational-metadata.xml.
- Generates an SDO Java class and places it in the WebSphereCommerceServerExtensionsLogic project
for:
- The new custom table XSUBSCRSCHTYPE.
- The modified WebSphere Commerce table SUBSCRIPTION.
- Creates a Java utility class to return the physical SDO root class (and its package) for the service module. This root class ensures that all WebSphere Commerce physical SDOs for the service module and any additional customized physical SDOs are available at run time.
- Creates an extension service module configuration file that instructs WebSphere Commerce to use the newly created subscription physical SDO class. This file at: WC_eardir\xml\config\com.ibm.commerce.subscription-ext\wc-component.xml.
- Creates an extension business object mediator configuration file that configures the business
object mediator to include data from the XSUBSCRSCHTYPE table in the user data of a ScheduleInfo
noun part.
This file is at: WC_eardir\xml\config\com.ibm.commerce.subscription-ext\wc-business-object-mediator.xml