-
Book Overview & Buying
-
Table Of Contents
Google Web Toolkit 2 Application Development Cookbook
By :
In this recipe, we are going to create all entity classes of the Sales database automatically by using some easy steps in a wizard.
The persistence unit should be created before going to create entity classes.
Go to File | New File….
Select Sales Processing System from the Project drop-down list.
Select Persistence from the Categories list.
Select Entity Classes from Database from the File Types list, as shown in the following screenshot:
![]() |
Click on Next.
Select sales from the Data Source field.
Click on the Add All>> button to select all the available tables:
![]() |
Click on Next.
Check the suggested class names. If they are according to the Java naming convention (which they are supposed to be), leave them as is; otherwise, modify those names.
Select com.packtpub.beans as the Package.
Check on Generate Named Query Annotations for Persistent Fields.
![]() |
Click on Next.
Select default from Association Fetch.
Select java.util.List from Collection...
Change the font size
Change margin width
Change background colour


