hibernate an introduction
Post on 15-Jul-2015
68 Views
Preview:
TRANSCRIPT
Hibernate an introduction
José Luis Muñoz
Jun 12, 2012
Contents 1
1. Problem, Software history
2. Advantages ORM (Object Relation Mapping)
3. How it works (high level vision)
4. Relation: Eclipse – DataBase – Hibernate
5. Configuration file cfg.xml
6. Mapping files
7. Object States
8. Example
Problem, Software history 2
1. SQL sentences into code
Business Classes Data Base
2. DAO Architecture
Business Classes DAO
SQL
Data Base
Problem, Software history 3
3. Mapping problem
Business Classes Data Base
Public class Employee { private String name; }
TABLE Employee ( VARCHAR2(50) NAME, )
Advantages ORM (Object Relation Mapping) 4
Advantages: - Complete database abstraction - IDE mapping generated for objects-tables relation
- Automatic state change
- Easy configurable through xml
- Implements JPA (Java Persistence Api) standar
How it works (high level) 5
How it works (high level more detail) 6
Relation: Eclipse – DataBase – Hibernate 7
Eclipse
Hibernate
Data Base
Data base connection
User Library Configuration file
Configuration file cfg.xml 8
Hibernate dialect
Mapping files 9
http://www.slideshare.net/rahuldausa/hibernate-for-beginners
Object States 10
Example (state change) 11
Methods: save(Object.class )
The End 12
joseluis@trustparency.es
top related