PrepAway - Latest Free Exam Questions & Answers

In an extension named myext, you defined Pump, a subtype of the Product item type with a property named effici

In an extension named myext, you defined Pump, a subtype of the Product item type with a property named efficiency. You have also extended the productDTO bean to have an efficiency property.

To copy the efficiency property to the productDTO, what do you need to do?

A. •Write a PumpAttributePopulator class that copies the efficiency property from the item to the DTO only if its method is passed an instance of PumpModel.
• Define a bean for this new class in myext-spring.xml, and use a modifyPopulatorList bean to add it to the productConverter’s list of populators.

B. • Make sure the definition of the Pump item type defines the efficiency attribute with persistence type property.
• When you run ant all, the productConverter class generated in bootstrap/gensrc will copy the efficiency property to the productDTO.

C. • Create a PumpPopulator class that extends ProductPopulator and copies the efficiency property from the Pump item to the productDTO bean.
• In myext-spring.xml, redefine the productPopulator alias to point to an instance of PumpPopulator.

D. • Write a PumpProductConverter class that extends AbstractPopulatingConverter, and copies the efficiency property from the Pump item to the productDTO bean if the item is an instance of Pump.
• Configure an instance of this converter in myext-spring.xml.


Leave a Reply

Your email address will not be published. Required fields are marked *