-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcours.txt
More file actions
34 lines (27 loc) · 889 Bytes
/
cours.txt
File metadata and controls
34 lines (27 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
JSE = JAVA STANDARD EDITION
JEE = JAVA ENTERPRISE EDITION
JME = JAVA MICRO EDITION
JPA = Java Persistence API
implemeentation JPA : Hibernate
Quelle est la diff entre JPA et ORM ? l'ORM est un principe plus large sur lequel repose JPA
ORM - Principe :
Java | BDD
|
Classe <----> Table
Attribut <----> Colonne
Objet <----> Enregistrement
Est ce que JPA suffit pour acceder à une BDD ? Non car :
__________________
|Application Java|
|API JPA |
|Hibernate |
|Librairie BDD |
------------------
POJO = Plain OLd Java Object
EntityManagerFactory emf = Persistence.createEntityManagerFactory("maConfig1");
EntityManager em = emf.createEntityManager();
Hotel h = new Hotel();
h.setNom("BeauRegard");
h.setVille("Lisbonne");
em.persist(h);
long id = h.getId();