Java Client Classes

The Java client application consists of five classes, four corresponding to those of the rulebase (Customer, LiabilityType, Coverage, and InsuranceAgent), and one class to construct the objects and to invoke the rulebase. The classes that correspond to the domain of the rulebase must comply with the Rules for Constructing Java Classes. In particular, unqualified class names must agree with the rulebase class names. In addition, property names must also agree with their counterparts in the rulebase. These classes must:

In addition, these classes should implement the Serializable interface. Otherwise the client is prevented from using any serialization features.

Care must be taken to insure appropriate mapping of Java Property types to corresponding rulebase data types. For example, where the rulebase specifies that timeInBusiness is of duration type, the corresponding property must be treated as a string in the Java class. For more information on type mapping, see Relationship between RDL Field Data Types and Java Property Types.

The WrapperMaker tool can be used to generate the Java classes that correspond to the rulebase classes and a template class for invoking the rulebase. The generated classes satisfy the above requirements. In addition to being used directly, the generated classes can also be used as guides in retrofitting existing classes.