File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

converting database tables into POJO

 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
may I know how to convert database into Hibernate POJO classes.

I want to know how to design/define 1...m , 1..1, m..m in POJOs of Hibernate.

many thanks in advance,
Rahul.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bit of a vague question this. Are you asking about auto generating java classes or how to define associations?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Hibernate mappings are covered in the Hibernate documentation.
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Sturrock wrote:Bit of a vague question this. Are you asking about auto generating java classes or how to define associations?



i am new to both hibernate and designing software components.

i am using oracle there i see 3 tables like department/ emp and some other table. what if i want to create a web application where the end user can submit the information abuot the employee to the database.

in otherwords, my web application uses hibernate as a middleware for curd operations. may i know how to design that.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked at the documentation? This is covered.
 
David Kilcy
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rauhl Roy wrote:
in otherwords, my web application uses hibernate as a middleware for curd operations. may i know how to design that.


You want to look at the MVC design pattern.
Model is your hibernate relational mapping
View is the web page for display
Controller is the code to interact with your model and view.

Let us know how you make out.
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Kilcy wrote:
Rauhl Roy wrote:
in otherwords, my web application uses hibernate as a middleware for curd operations. may i know how to design that.


You want to look at the MVC design pattern.
Model is your hibernate relational mapping
View is the web page for display
Controller is the code to interact with your model and view.

Let us know how you make out.


does it mean hibernate is used as a middle layer between database and controller?
 
David Kilcy
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rauhl Roy wrote:
David Kilcy wrote:
Rauhl Roy wrote:
in otherwords, my web application uses hibernate as a middleware for curd operations. may i know how to design that.


You want to look at the MVC design pattern.
Model is your hibernate relational mapping
View is the web page for display
Controller is the code to interact with your model and view.

Let us know how you make out.


does it mean hibernate is used as a middle layer between database and controller?


Yes
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic