concept wrapper in category ejb

This is an excerpt from Manning's book EJB 3 in Action, Second Edition.
The code in this listing performs a join of the selected entities and creates a wrapper entity. A wrapper entity is a synthetic object that’s used to encapsulate the fields you’re retrieving—it is essentially a data transfer object (DTO). We’ll cover wrappers in section 11.2.6 when we discuss the SELECT clause.
Working with arrays of objects is problematic because you won’t discover errors with the handling of the array until runtime. Furthermore, depending on the type of data you’re dealing with, you might not discover that the array element is being accessed. For example, if you were retrieving bid start and end dates, you might not realize an error where you accidently grabbed the wrong date/time due to an off-by-one mistake. With wrappers, you can construct an object just to handle the results of the query. In the example earlier from ActionBazaar, you used a wrapper to collect all of the values returned by a JOIN expression into a single object that summarized a winning bid. The relevant code from the section on joining is shown again in the following listing.