Develop > Persistence layer > Data assets > Work with the Data load utility
Configure the BusinessObjectBuilder
The business object builders provided with the data load utility are the BaseBusinessObjectBuilder and TableObjectBuilder. You can configure the business object builders by defining sub elements and attribute values in the business object configuration file.
BaseBusinessObjectBuilder
The BaseBusinessObjectBuilder is used to build a component business object based on the configuration parameters, and the input data. The following attributes and sub elements are specific to the BaseBusinessObjectBuilder.
- packageName attribute
This is the business object package name. Every component has one package name. The following is a list of the package name for each component:
- Catalog component: com.ibm.commerce.catalog.facade.datatypes.CatalogPackage
- Inventory component: com.ibm.commerce.inventory.facade.datatypes.InventoryPackage
- Price component: com.ibm.commerce.price.facade.datatypes.PricePackage
- dataObjectType attribute
The business object type. The data object type is different for each business object.
- The catalog component supports the following dataObjectType: CatalogType, CatalogGroupType, CatalogEntryType, and AttributeDictionaryAttributeType.
- The inventory component supports the following dataObjectType: InventoryAvailabilityType, ExpectedInventoryRecordType, and InventoryReceiptType.
- The price component supports the following dataObjectType: PriceListType.
- <_config:DataMapping> element
The <_config:DataMapping> element contains one or more <_config:mapping> element. The <_config:mapping> attributes are defined...
- xpath
- The xpath to the property in the business object.
- value
- The value is populated to the business object. Typically, it is a key, and the real value depends on the valueFrom attribute.
- valueFrom
- The valueFrom attribute indicates how to resolve the value. The default value is the InputData. The following are supported valueFrom:
- InputData: It indicates that the value is from InputData.
- Fixed: The value is a fixed value.
- deleteValue
- The delete flag indicates whether the business object should be deleted.
TableObjectBuilder
The TableObjectBuilder is used to build the table data object based on the configuration parameters and the input data. The following sub elements are specific to the TableObjectBuilder:
- <_config:Table> element This element contains a list of <_config:Column> sub elements. The attribute definitions are specified...
- name
- The table name in the database.
- deleteKey
- It points to a column name in the CSV file. See the description of deleteValue attribute on how to use this attribute.
- deleteValue
- It is a delete flag. If the data in the column name specified by the deleteKey matches the deleteValue, the row is deleted from the database.
- <_config:Column> element This element can contain one optional <_config:IDResolve> sub element. The attribute definitions are specified...
- name
- The column name in the database.
- value
- The column value. Typically, it is a key and the real value depends on the valueFrom attribute to indicate how the value is resolved.
- valueFrom
- It indicates how to resolve the value. The following are the supported valueFrom:
- InputData: It indicates that the value is from InputData.
- Fixed: The value is a fixed value.
- IDResolve: The value is from the ID resolver. In this case, the <_config:Column> element might contain an optional <_config:IDResolve> element to indicate how to resolve the ID.
- BusinessContext: The value is from the business context.
- <_config:IDResolve> element This element can contain a list of <_config:UniqueIndexColumn> sub elements to help to resolve the ID. The attribute definitions are specified...
- tableName
- The name of the table to be used for the ID resolver.
- generateNewKey
- true: If the ID cannot be resolved from the database, a new key is generated.
- false: If the ID cannot be resolved from the database, an exception is thrown, instead of generating a new key.
- primaryKeyColumnName
- The name of the primary key column to be resolved. This parameter is optional if the primary key for this table has only one column. Otherwise, it is mandatory.
- <_config:UniqueIndexColumn> element The attribute definitions are specified...
- name
- The unique index column name.
- value
- The unique index column value. Typically, it is a key and the real value depends on the valueFrom attribute to indicate how the value is resolved.
- valueFrom
- It indicates how to resolve the value. The following are supported valueFrom:
- InputData: It indicates that the value is from InputData.
- Fixed: The value is a fixed value.
- BusinessContext: The value is from the business context.