Setting objects are used to control the order in which the mappings for Sequenced Objects are processed.
Example 1Setting piSetting = new Setting(null, "personal-info"); Setting fnSetting = new Setting(null, "first-name"); piSetting.addChild(fnSetting); Setting fnTextSetting = new Setting(null, "text()"); fnTextSetting.setObject(customerObject); fnTextSetting.setMapping(customerFirstNameMapping); fnTextSetting.setValue("Jane"); fnSetting.addChild(fnTextSetting); Setting lnSetting = new Setting(null, "last-name"); piSetting.addChild(lnSetting); Setting lnTextSetting = new Setting(null, "text()"); lnTextSetting.setObject(customerObject); lnTextSetting.setMapping(customerLastNameMapping); lnTextSetting.setValue("Doe"); lnSetting.getSequence().add(lnTextSetting);
<personal-info> <first-name>Jane</first-name> <last-name>Doe</last-name> </personal-info>Example 2
Setting fnpiSetting = new Setting(null, "personal-info"); Setting fnSetting = new Setting(null, "first-name"); fnpiSetting.addChild(fnSetting); Setting fnTextSetting = new Setting(null, "text()"); fnTextSetting.setObject(customerObject); fnTextSetting.setMapping(customerFirstNameMapping); fnTextSetting.setValue("Jane"); fnSetting.addChild(fnTextSetting); Setting lnpiSetting = new Setting(null, "personal-info"); Setting lastNameSetting = new Setting(null, "last-name"); lnpiSetting.addChild(lnSetting); Setting lnTextSetting = new Setting(null, "text()"); lnTextSetting.setObject(customerObject); lnTextSetting.setMapping(customerLastNameMapping); lnTextSetting.setValue("Doe"); lnSetting.addChild(lnTextSetting);
<personal-info> <first-name>Jane</first-name> </personal-info> <personal-info> <last-name>Doe</last-name> </personal-info>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|