IntelliJ IDEA 14.0.0 Web Help

Creating Transfer Objects

Transfer Object is used as a proxy between an entity bean and its client. Entity beans use transfer objects to send data to the clients thus reducing the exchange traffic, because all required data are transferred at once, packed in a single object.

Though you can create a transfer object manually, as a class that implements the Serializable interface and provides accessor methods to certain fields of an entity bean, IntelliJ IDEA helps automatically generate stub source code.

To create a transfer object

  1. In the EJB tool window, right-click the desired entity bean.
  2. On the context menu, click New , and then choose Transfer Object on the submenu.
    transferObject1.png
  3. In the dialog box Select Accessors of Fields to Include in Transfer Object, select the methods to be included in the new transfer object.
    transferObject2.png
  4. Specify the following parameters:
    • Name of the transfer object class. Note that IntelliJ IDEA suggests a pattern for generating the class name, so you can only change the initial part of it.
    • Whether the accessor methods will be generated in the bean interface.
  5. Click OK.

See Also

Concepts:

Web Resources:

Last modified: 12 November 2014
comments powered by Disqus