At this point we can either select an existing data source, or, as we did in the
previous example, create one "on the ly". In our example we created a new one,
then selected the database connection we created earlier in this section.
Once we have created or selected our data source, we need to select one or more
tables to generate our JPA entities. If we wish to create JPA entities for all tables, we
can simply click on the Add All>> button.
After clicking on Next> , NetBeans gives us the opportunity to change the names
of the generated classes, although the defaults tend to be sensible. We should also
specify a package for our classes, and it is a good idea to check the Generate Named
Query Annotations for Persistent Fields checkbox. We can also optionally generate
JAXB ( Java API for XML Binding ) annotations and create a persistence unit.