skip to main content
Corticon Server: Integration & Deployment Guide : Preparing Studio files for deployment : Attribute mapping
 

Try Corticon Now

Attribute mapping

When attempting to map attributes, the mapper looks for class properties which are exposed using public get and set methods by the same name. For example, if mapping attribute flightNumber, the mapper looks for public getFlightNumber and setFlightNumber methods in the mapped class.
Figure 293. Second Portion of MyAircraft Class
When Java Object mapping has been added to the Vocabulary, its Attribute properties are displayed.
Table 22. Java Object Mapping Attribute Properties
Java Object Get Method
Manually specifies the GET method of a class property that does not conform to naming conventions of the auto-mapper.
Java Object Set Method
Manually specifies the SET method of a class property that does not conform to naming conventions of the auto-mapper.
Java Object Field Name
Manually specifies a public instance variable name.
In the case of attribute tailNumber, the mapper finds get and set methods that conform to this naming convention, so the method names are inserted into the fields in gray type, as shown in the following figure.
Figure 294. Auto-Mapped Attribute Method Names
In those cases where the mapper cannot locate the corresponding methods, you will need to select them manually. Notice in the MyAircraft class shown in First Portion of MyAircraft Class, no get and set methods exist for istrAircraftType since it is a public instance variable. Therefore, we need to select it from the Java Object Field Name drop-down, as shown in the following figure.
Figure 295. Manually Mapped Public Instance Variable Name
When a class property contains get and set methods, but their names do not conform to the naming convention assumed by the auto-mapper, we must select the method names from the Java Object Get Method and Set Method drop-downs, as shown in the following figure.
Figure 296. Manually Mapped Property Get and Set Method Names
Note: Java Object Messaging and mapping in versions of Corticon Studio prior to 5.2 required manual mapping of external data types as well.
A property's data type is detected by the auto-mapper, so there is no need to manually enter it. This is shown by the flightNumber attribute in the following figure.
Figure 297. Auto-Mapped Property Despite Different Data Type
Note: First Portion of MyAircraft Class shows that this property uses a primitive data type int, and it is automatically mapped anyway.