• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to use hibernate annotations?

 
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic