1 / 12

Hibernate Online Training

Quontra Solutions Online Training is a popular and in fact preeminent online institute that offers Java online training by reputed and certified professionals. Java is one of the best programming language created ever, Earlier with ground breaking changes in form of Enum, Generics, and Autoboxing in Java 5, performance improvement with Java 6, and Google's choice of language for Android apps development, keeps Java as front line programming language. For free demo and any questions feel free to call us

Download Presentation

Hibernate Online Training

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:44 (0)20 3734 1498 / 99 Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

  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:44 (0)20 3734 1498 / 99 Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

  3. Architecture of Hibernate For More info call:44 (0)20 3734 1498 / 99 Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

  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:44 (0)20 3734 1498 / 99 Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

  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:44 (0)20 3734 1498 / 99 Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

  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:44 (0)20 3734 1498 / 99 Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

  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:44 (0)20 3734 1498 / 99, Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

  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:44 (0)20 3734 1498 / 99 Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

  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:44 (0)20 3734 1498 / 99 Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

  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:44 (0)20 3734 1498 / 99 Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

  11. Thank u For More info call:44 (0)20 3734 1498 / 99 Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

  12. Any Questions For More info call:44 (0)20 3734 1498 / 99 Mail:info@quontrasolutions.co.uk , Visit:www.quontrasolutions.co.uk

More Related