GeekInterview.com
Series: Subject: Topic:
Question: 5 of 11

POJOs

What are POJOs?
How POJOs are created & used in Hibernate?
Asked by: swap_j2ee | Member Since Sep-2009 | Asked on: Sep 18th, 2009

View all questions by swap_j2ee

Showing Answers 1 - 1 of 1 Answers

You can use the Hibernate Mapping Files and POJOs from a Database wizard to generate files for you. The wizard can generate a POJO and a corresponding mapping file for each table that you select in the wizard. The mapping files are XML files that contain data about how the columns in the tables are mapped to the fields in the POJOs. You need to have the hibernate.reveng.xml and hibernate.cfg.xml files to use the wizard.

To create the POJOS and mapping files using a wizard, perform the following steps.

  1. Right-click the Source Packages node in the Projects window and choose New > Other to open the New File wizard.
  2. Select Hibernate Mapping Files and POJOs from a Database in the Hibernate category. Click Next.
  3. Ensure that the hibernate.cfg.xml and hibernate.reveng.xml files are selected in the drop down lists.
  4. Select JDK 5 Language Features under the General Settings options.
  5. Ensure that the Domain Code and Hibernate XML Mappings options are selected.
  6. Select  the Package name. Click Finish.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Answered Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.