Solved

Difference between a HibernateMapping class, DAO class and Model class

Posted on 2006-10-20
6
835 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum6 challenge 6 76
Exception after setting jdbc session management 2 51
JUnit 4 @Before and @BeforeClass differences 3 47
Java JRE greater than 1.6 5 49
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

943 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

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now