An ORM tool simplifies the data creation, data manipulation and data access. It is a programming technique that maps the object to the data stored in the database.
- Products:
- Hibernate
- Java Persistence API (JPA)
- EJB, EntityBean
- iBats
- TopLink
SQL | HS | EM |
---|---|---|
insert | save(obj) | persist(obj) |
load an obj | load/get(, id) | find(, id) |
update | load/get + setter | find + setter |
delete | delete(obj) | remove(obj) |
select | createQuery(hql) | createQuery(JPAquery) |
get a result | query.list() | query.getResultList() |