02_2nd package com

3
Files required: ---------------- Customer.java customer.hbm.xml HClient.java hibernate.cfg.xml customer_table <hibernate-mapping package="com.jlc.hibernate"> <class name="Customer" table="customer_table "> <id name="cid" column="cid" type="int"> <generator class="increment"/> </id> <property name="cname" column="cname" type="string"/> <property name="email"/> package com.jlc.hibernate; public class Customer { private int cid; private String cname; private String email; private long phone; private String location; public Customer() { } public Customer(String cname, String email, long phone, String location) { this.cname = cname; this.email = email; this.phone = phone; this.location = location; <hibernate-configuration> <session-factory> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://localhost/raman</property> <property name="connection.username">root</property> <property name="connection.password">rajiv</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="show_sql">true</property> <mapping resource="com/jlc/hibernate/customer.hbm.xml"/> Customer.java customer.hbm.xml HIBERNATE 4

Upload: phani

Post on 17-Aug-2015

213 views

Category:

Documents


0 download

DESCRIPTION

hib prg

TRANSCRIPT

Files required: ---------------- Customer.java customer.hbm.xml HClient.java hibernate.cfg.xml customer_table