Populates a business object with values extracted from serialized input data.
Syntax
public abstract void getBO(Reader serializedData, BusinessObjectInterface theBusObj, Object config);
public abstract BusinessObjectInterface getBO(Reader serializedData, Object config);
Parameters
Return values
The first form of this method has no return value. The second form returns a business object.
Notes
This getBO() method is the abstract method that performs string-to-business-object conversion for a data handler; that is, it defines the way to convert generic serialized data (accessed with a Reader object) to a business object. This method has two forms:
You pass the serialized data into getBO() as a Java Reader object. However, because Reader is a base class, you actually pass an instance of one of several subclasses of the Reader class. Some of the Reader subclasses provide an implementation for the mark() operation and some do not. The mark() operation allows the caller to mark a particular position within the stream and then subsequently return to that position.
If you need to provide your data handler with more configuration information than is included in the meta-object, you can use the config option to pass in an object that contains this information. For example, config could be a template file or a string to a URL for a schema that is used to build an XML document from a business object.
If config is a business object type, you can implement the getBO() method to call setupOptions(config). The setupOptions() method is defined in the DataHandler base class. This method uses the attribute names in the business object as property names and the default values as the values for those properties. It sets the values of the configuration properties in the object for use by the data handler.
Once you have implemented the abstract getBO() method, the
component that calls the data handler can call one of the public
string-to-business-object conversion methods, shown in Table 79.
Table 79. Public string-to-business-object conversion methods
Public string-to-business-object conversion method | Description |
---|---|
getBO(Object serializedData, Object config) | Convert serialized data in a generic Object to a business object |
getBO(String serializedData, Object config) | Convert serialized data in a Object to a business object |
getBO(InputStream serializedData, Object config) | Convert serialized data in an InputStream to a business object |
getBO(byte[] serializedData, Object config) | Convert serialized data in a byte array to a business object |
See also