Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Java EE 7 Development with NetBeans 8
  • Table Of Contents Toc
  • Feedback & Rating feedback
Java EE 7 Development with NetBeans 8

Java EE 7 Development with NetBeans 8

By : David R Heffelfinger
4.8 (6)
close
close
Java EE 7 Development with NetBeans 8

Java EE 7 Development with NetBeans 8

4.8 (6)
By: David R Heffelfinger

Overview of this book

The book is aimed at Java developers who wish to develop Java EE applications while taking advantage of NetBeans functionality to automate repetitive tasks. Familiarity with NetBeans or Java EE is not assumed.
Table of Contents (13 chapters)
close
close
12
Index

Automated generation of JPA entities

In many projects, we will be working with an existing database schema created by a database administrator. NetBeans can generate JPA entities from an existing database schema, which saves us a lot of potentially tedious work.

In this section, we will use a custom database schema. In order to create the schema, we need to execute an SQL script that will create the schema and populate some of its tables. In order to do this, we need to go to the Services window, expand Databases, right-click on JavaDB, and select the Create Database... option.

Automated generation of JPA entities

Then, we need to add the database information in the Create Java DB Database wizard.

Automated generation of JPA entities

At this point, we can open our SQL script file by going to File | Open File... and navigating to its location on our disk and opening it. The filename of our script is create_populate_tables.sql. It is included as part of the source bundle for this chapter. The following screenshot shows the file as soon as we open it in our project...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY