Tuesday, November 07, 2006

J2EE:Creating POJOs from Database tables using Oracle Toplink feature

Maynot be a frequent requirement, but sometimes developers may need to create Plain Old Java Objects(POJOs) out of Database Tables.This can be easily created by using the Oracle Toplink feature available in JDeveloper.

1)-Create a new Application, say ToplinkResearch.
2)-Add a project to this Application, say ToplinkResearch.
3)-Click New->Business Components->select Toplink/JPA.
4)-It will ask for the Database connection and at the same time an offline database
schema it asks for to maintain in the middle-tier.(You can create at the same time
as well!!)
5)-Select the Table name from the List, just we select for an Entity Object.
6)-Thats all and the POJO is created and ready to be compiled.
7)-This class can be refactored to be used in any other project.
8)-Right click on the POJO class and select "New Sample Java Client.." and it will
create a sample Java client that uses this POJO(However, in JM8, this client class
gives runtime exception).


11 comments:

  1. Anonymous3:18 PM

    Highly descriptive post, I liked that a lot. Will there be a part 2?

    dream marriage
    Have a look at my web blog ; telegraph dating

    ReplyDelete
  2. Greens Technology's the leading software Training & placement centre Chennai & ( Adyar)
    apple-ios training in chennai

    ReplyDelete

  3. Besant Technologies is a technology oriented company engaged in the business of providing job training for all types of Internet Marketing Courses used in the real world job environment.So join us besant technologies. AWS Training in Bangalore |
    DataScience Training in Bangalore |

    ReplyDelete
  4. Anonymous2:07 AM

    Hi,
    Thanks for sharing such an informative blog. I have read your blog and I gathered some needful information from your blog. Keep update your blog. Awaiting for your next update.


    weblogic tutorial

    ReplyDelete
  5. Thanks for Posting Such An Valuable Information,The Best Blog I Have Seen in the recent times Providing quality information about online it courses,we provide Urgent Care Services in chicago.Thanks For Sharing knowledge With Us.Really Thanks for Posting.It's A Worth Sharing Blog.

    ReplyDelete
  6. This Blog Provides Very Useful and Important Information. I just Want to share this blog with my friends and family members. Tibco Certification Training

    ReplyDelete
  7. Really A great informative blog post this blog provides only valuable information on Mulesoft Certification Training .Thanks For Sharing.

    ReplyDelete
  8. One of the finest and informative blog Just NewsTo U 99 thanks for sharing such an useful stuff with us.

    ReplyDelete
  9. Attend The Data Scientist Courses From ExcelR. Practical Data Scientist Courses Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Scientist Courses. Data Scientist Courses

    ReplyDelete
  10. atleast great info provision is good
    oracle training in chennai

    ReplyDelete