Billabong is a stub code generator that creates business layer code. The objects created are used by the presentation layer to access business logic. This may include controlled access to the data layer. The business objects that are referenced by the presentation layer are called 'PO-BOs'.
To generate the code, Billabong refers to the application configuration file and to all presentation layer configuration files. For each CORE.PO.x section, Billabong generates a xBO.java file. Also generated are the application base file called [APP_NAME]BO.java in the src/business directory and a java file for each subdirectory under the src/business directory. Finally, if the DO section is available, Billabong generates business objects that interface to the data layer. These business objects extend the BDO classes generated by DODS and are referred to as 'BDO-BOs'.
All PO-BOs eventually subclass the [APP_NAME]BO. PO-BOs in subdirectories subclass the BO for the directory, e.g. if the subdirectory is reports, then PO-BOs in the reports directory subclass the ReportsBO class. Each subdirectory BO in turn extends the BO for its parent directory until the src/business directory is reached and the [APP_NAME]BO is subclassed.
The use of the subdirectory BOs and the application wide [APP_NAME]BO allows grouping of common logic. Putting code into the application BO allows all PO-BOs to access the information. For example, Billabong autogenerates the code necessary to save and restore the BDO-BO objects in the session data to minimise creating and destroying database connections.
Although Billabong generates the BDO-BOs, Squirt must be used to create any queries required. The code generated in the BDO-BOs is global-like getIdValue methods. For each ID in the configuration files that refers to a table, an entry is created in the getIdValue function to extract that value from the table in the database. If the field referred to is in a referenced table, the full 'path' to the field is generated. For example, if the Person table refers to a Company table via the field CompanyId, then within PersonBO, a reference to the company Name field can be obtained: personDOs[x].getCompanyId().getName().
For information on some of the methods generated, see the Interface between Presentation and Business Layers.