Solved

Difference between a HibernateMapping class, DAO class and Model class

Posted on 2006-10-20
6
838 Views
Last Modified: 2008-03-10
Hi people,

What's the difference between a Hibernate mapping class, DAO class and a Model class?
0
Comment
Question by:blaze_wk
  • 2
6 Comments
 
LVL 9

Expert Comment

by:shinobun
ID: 17781192
Where did you get those terms?  I don't think mapping is a class, unless you're talking about the actual implementation of Hibernate...
0
 

Author Comment

by:blaze_wk
ID: 17782832
Yes I'm talking about the actual implementation of Hibernate. And in there I understand that we have to modify some XML files, and also create a class that would have the gettters and setters. I understand there's more to it as well.
0
 
LVL 9

Accepted Solution

by:
shinobun earned 250 total points
ID: 17783632
The actual implementation of the mapping class can be found in the package org.hibernate.mapping [1].  For the actual XML configuration, see the reference manual [2].

Hibernate does not provide any DAO classes/model classes, that would be implemented by the user.  Again, see the reference manual on how to make your DAOs [3] and models [4].

[1] http://www.hibernate.org/hib_docs/v3/api/org/hibernate/mapping/package-summary.html
[2] http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html
[3] http://www.hibernate.org/hib_docs/v3/reference/en/html/objectstate.html
[4] http://www.hibernate.org/hib_docs/v3/reference/en/html/persistent-classes.html
0
 
LVL 6

Assisted Solution

by:phuocnh
phuocnh earned 250 total points
ID: 17787978
To me, their difference is about idea:
+Hibernate: Try to save the java object into relational database instead of object database.
+DAO, Model: Try to make accessing to data independent on data storage mechanism.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java SE 8u111  Lot of stuff broke 11 69
reverse digits of a number using for loop 5 42
servlet example issue 6 40
hibernate jars 4 32
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question