Skip to content
Diogo Guedes edited this page Mar 27, 2019 · 9 revisions

The JPA interface allows for easy manipulation of relational databases or persistence data.

JPQL is the query language used in JPA to interact with JPA entity objects. It doesn't interact directly with database tables.

Entity class

Create an entity class for the database table that we wil be interacting with through Java code:

jpa1_img

Select and add the desired table:

jpa2_img

Specify or create a package for the entity class:

jpa3_img

And finish. This will create the entity class Productssearches.java.

Session bean

To interact with the database we need to create a session bean:

session_bean1

Select and add the target entity class:

session_bean2

And finish. Two classes will be created: AbstractFacade.java and ProductssearchesFacade.java.

Clone this wiki locally