Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use hibernate annotations?

 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

1.How to use Hibernate annotation.
2. What is Hibernate Annotation?
3. What is the important usage of annotations?
4. How to apply the annotion
5. What is the important reference URL for annotation

Thanks
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This reads like a "homework assignment".

Have you considered just reading the docs on the Hibernate site? They're not that complex.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe, but Edward hasn't asked homework assignments before, so I am easily going to assume that it is not.

To use Hibernate Annotations you just need Hibernate 3.x and Java 5.0 SDK.

Annotations are Java's way of adding the features you had originally gotten from XDoclet. They take the form of @Annotation before class definition, attributes and methods of classes. By default all you need on a class is the @Entity at the class level, and @Id on the PK field and your class is now a mapped class. By default when you put @Id all the attributes of the class are now going to be persisted.

Mark
 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Thanks for your replies

I saw one class declaration like

public class ExportBatchDaoImpl extends HibernateBaseDao<ExportBatch> implements ExportBatchDao {

in the above code what is HibernateBaseDao<ExportBatch> means?

Thanks for your reply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic