1 / 12

Hibernate Overview by Quontra Solutions

Quontra Solutions have certified trainers. Quontra Solutions are providing Exclusive Training on Java. We will cover the basics of java programming starting with all the topics. Faculty from top MNC’s with highly skilled domain expertise will train & guide you with real time examples. We are welcoming to all candidates who want to start their career as java programmer. Our trainers will teach you basic level to advanced level. Course Features: • Interview guidance – Questions • We provide Course Materials • Each topic coverage with real time solutions

Download Presentation

Hibernate Overview by Quontra Solutions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hibernate by Quontra Solutions For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

  2. What is Hibernate? • Hibernate is an open source, lightweight, ORM(Object Relational Mapping) tool. • It’s a pure java object relational mapping persistence framework that allows you to map plain old Java objects to relational database tables For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

  3. Architecture of Hibernate For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

  4. Example to Create a Hibernate Application in Eclipse • Create the java project • Add jar files for hibernate • Create the Persistent class • Create the mapping file for Persistent class • Create the Configuration file • Create the class that retrieves or stores the persistent object • Run the application For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

  5. Create the java project Open Eclipse IDE---->File Menu----->New---->Project---> Java Project----> Specify the Project name----->Finish Add Jar files To Hibernate • To add the jar files Right click on your project • Build path • Add external archives. • Now select all the jar files For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

  6. Create persistent Class package com.mypackage; public class Employee { private int id; private String fname,lname; public intgetId() { return id; } public void setId(int id) { this.id = id; } public String getFname() { return fname; } public void setFname(String fname) { this.fname = fname; } public String getLName() { return lName; } public void setLname(String lname) { this.lname = lname; } } Employee.java For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

  7. Mapping Class <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="com.mypackage.Employee" table="emp1000"> <id name="id"> <generator class="assigned"></generator> </id> <property name="fname"></property> <property name="lname"></property> </class> </hibernate-mapping> employee.hbm.xml For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

  8. <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPEhibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration><session-factory><property name="hbm2ddl.auto">update</property> <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property> <property name="connection.url">jdbc:oracle:thin:@localhost:1521:xe</property> <property name="connection.username">system</property><propertyname="connection.password">oracle</property> <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property> <mapping resource="employee.hbm.xml"/> </session-factory> </hibernate-configuration> configuration Class hibernate.cfg.xml For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

  9. Run Application • Create a class that retrieves and stores the persistent object • To run the hibernate application, right click on the StoreData • class - Run As - Java Application. • Finally run the application For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

  10. Quontra Solutions Offers • informatica • JAVA • Oracle-12c DBA • Cognos • QlikView • SQL Server • MS.NET, OBIEE • data warehousing, • Sharepoint • Testing Tools • ASP.Net • Hadoop • Salesforce etc…. For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

  11. Thank u For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

  12. Any Questions For More info call:(404)900-9988, Mail:info@quontrasolutions.com Visit:www.quontrasolutions.com

More Related