August 2018
Intermediate to advanced
314 pages
8h 9m
English
The JPA entity is a class that represents some table or view of a database. The entity needs to have an attribute that identifies only one entity, needs to have a constructor with non-arguments and each object of a class that is a JPA entity identify only one row of table or view.
In the following code, we have an interface, called Entity, that all JPA entities will implement according to the following method:
public interface Entity < T > { public T getId();}
In the following code, we have the transfer object, called Employee, which is a JPA entity. This class has the mapping table, called Employee, as well as its column used by applications. The business tier only needs to know the transfer objects, the ...
Read now
Unlock full access