Implementing the persistence layer for the HCL Commerce BOD programming model
The BOD programming model provides a JPA framework to replace the DSL in V9. In this
lesson, you use the JPA framework to generate service data objects.
About this task
- Static physical Service Data Objects (SDO) that provide a Java representation of the service
module view of the HCL Commerce schema. Each service module has a physical SDO for the
tables that are read, updated, or deleted by the service module. For example, the catalog service
module contains a physical SDO for the CATALOG table but the catalog service module does not contain
a physical SDO for the ORDER table. Note: These physical SDOs are independent of the SDOs that are used to represent the logical model of a service module.
Procedure
- Select the Rest-config\beanMapping-ext and Rest-config\commandMapping-ext folders and the file resources-ext.properties in the temporary location and copy them to the corresponding location in the development environment. If the file already exists at that location, merge it with this copy.
-
Copy all the java code from
WebSphereCommerceServerExtensionsLogic
andWebSphereCommerceServerExtensionsData
to your corresponding location. - Publish the JAR files to the transaction server.
- Verify the two rest API which were used, by issuing a get project call by Primary Key (PK), and a change project name.
-
Get Project by PK (method: GET):
Change project name by PK (method: PUT):https://9.111.139.128:443/wcs/resources/store/1/project?xproject_id=2001
https://9.111.139.128:443/wcs/resources/store/1/project?xproject_id=2001