Java Reference
In-Depth Information
The option entitled “Entity Class” allows one to generate a blank entity class, and “Entity Classes from Database”
allows one to generate an entity class from a selected database table. In doing so, all of the requisite code for mapping
the entity class to the selected database table is automatically generated for you.
JPQL
NetBeans 7.3 and beyond include a new feature that allows one to query a database using JPQL syntax. This can be
quite helpful for those who are using JPQL in their EJB session beans. To access the JPQL query tool, perform the
following steps:
1.
Expand a NetBeans Web Project that contains a persistence.xml configuration file in the
project “Configuration Files” directory.
2.
Right-click on the persistence.xml configuration file to open the context menu.
3.
Click on “Run JPQL Query” to open the tool.
4.
Type the JPQL query into the editor and click the run button to execute, as shown in
Figure 12-12 .
Figure 12-12. JPQL Query
 
Search WWH ::




Custom Search