public class BaseBusinessObjectBuilder extends AbstractBusinessObjectBuilder
This is an base implementation class which extends from the AbstractBusinessObjectBuilder. It assumes that the input data read from the DataReader is a Map and the business object it needs to populate is a DataObject. This implementation will reuse the DataObject. That is, the DataObject is created in the init() method and it is reused every time the populateDataLoadBusinessObject() method is called. All properties defined in the xpath mapping in the configuration file will be re-populated every time. When the DataObject is passed to the mediator, the mediator should not delete or add new properties to the DataObject. Otherwise, the population of the DataObject may fail if some properties are deleted or the old properties may not get updated if the new properties are added.
Constructor and Description |
---|
BaseBusinessObjectBuilder() |
Modifier and Type | Method and Description |
---|---|
protected commonj.sdo.DataObject | createBaseDataObject()
This method creates the logical data object used to populate with the raw data read in by the physical reader.
|
void | init()
Initialize the business object builder.
|
protected DataLoadBusinessObject | populateDataLoadBusinessObject(java.lang.Object inputData)
This method populated the base logical data object with the raw data read in from the data reader, based on the data mapping configuration read in from the businesss object configuration file.
|
protected void | reset(commonj.sdo.DataObject dataObject)
Reset the data object values because the data object needs to be reused.
|
protected commonj.sdo.DataObject createBaseDataObject() throws DataLoadException
This method creates the logical data object used to populate with the raw data read in by the physical reader.
public void init() throws DataLoadException
Initialize the business object builder.
protected void reset(commonj.sdo.DataObject dataObject)
Reset the data object values because the data object needs to be reused.
It is called in the execute method. Subclasses should override this method if there are any values that need to be reset.
protected DataLoadBusinessObject populateDataLoadBusinessObject(java.lang.Object inputData) throws DataLoadException
This method populated the base logical data object with the raw data read in from the data reader, based on the data mapping configuration read in from the businesss object configuration file. It also set the action code to the returned DataLoadBusinessObject.