update
This commit is contained in:
parent
2992f4f408
commit
4f46de8d00
3330 changed files with 394553 additions and 76939 deletions
30
.config/Code/User/History/-45886119/1EY6.java
Normal file
30
.config/Code/User/History/-45886119/1EY6.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
package com.practice;
|
||||
|
||||
import org.hibernate.Transaction;
|
||||
|
||||
import org.hibernate.Session;
|
||||
|
||||
public class Main{
|
||||
public static void main(String[] args){
|
||||
|
||||
Session session = HibernateUtil.getSessionfactory().openSession();
|
||||
Transaction tx = null;
|
||||
try{
|
||||
tx = session.beginTransaction();
|
||||
Student newStudent = new Student(2526, "rafay", 3.14);
|
||||
session.save(newStudent);
|
||||
tx.commit();
|
||||
}
|
||||
catch(Exception e){
|
||||
if(tx != null){
|
||||
tx.rollback();
|
||||
}
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally{
|
||||
session.close();
|
||||
}
|
||||
|
||||
HibernateUtil.shutdown();
|
||||
}
|
||||
}
|
30
.config/Code/User/History/-45886119/1cY2.java
Normal file
30
.config/Code/User/History/-45886119/1cY2.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
package com.practice;
|
||||
|
||||
import org.hibernate.Transaction;
|
||||
|
||||
import org.hibernate.Session;
|
||||
|
||||
public class Main{
|
||||
public static void main(String[] args){
|
||||
|
||||
Session session = HibernateUtil.getSessionfactory().openSession();
|
||||
Transaction tx = null;
|
||||
try{
|
||||
tx = session.beginTransaction();
|
||||
Student newStudent = new Student(2526, "rafay", 3.14);
|
||||
session.save(newStudent);
|
||||
tx.commit();
|
||||
}
|
||||
catch(Exception e){
|
||||
if(tx != null){
|
||||
tx.rollback();
|
||||
}
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally{
|
||||
session.close();
|
||||
}
|
||||
|
||||
HibernateUtil.shutdown();
|
||||
}
|
||||
}
|
30
.config/Code/User/History/-45886119/1olJ.java
Normal file
30
.config/Code/User/History/-45886119/1olJ.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
package com.practice;
|
||||
|
||||
import org.hibernate.Transaction;
|
||||
|
||||
import org.hibernate.Session;
|
||||
|
||||
public class Main{
|
||||
public static void main(String[] args){
|
||||
|
||||
Session session = HibernateUtil.getSessionfactory().openSession();
|
||||
Transaction tx = null;
|
||||
try{
|
||||
tx = session.beginTransaction();
|
||||
Student newStudent = new Student();
|
||||
session.save(newStudent);
|
||||
tx.commit();
|
||||
}
|
||||
catch(Exception e){
|
||||
if(tx != null){
|
||||
tx.rollback();
|
||||
}
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally{
|
||||
session.close();
|
||||
}
|
||||
|
||||
HibernateUtil.shutdown();
|
||||
}
|
||||
}
|
30
.config/Code/User/History/-45886119/QfQb.java
Normal file
30
.config/Code/User/History/-45886119/QfQb.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
package com.practice;
|
||||
|
||||
import org.hibernate.Transaction;
|
||||
|
||||
import org.hibernate.Session;
|
||||
|
||||
public class Main{
|
||||
public static void main(String[] args){
|
||||
|
||||
Session session = HibernateUtil.getSessionfactory().openSession();
|
||||
Transaction tx = null;
|
||||
try{
|
||||
tx = session.beginTransaction();
|
||||
Student newStudent = new Student(2340, "hassan", 4);
|
||||
session.save(newStudent);
|
||||
tx.commit();
|
||||
}
|
||||
catch(Exception e){
|
||||
if(tx != null){
|
||||
tx.rollback();
|
||||
}
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally{
|
||||
session.close();
|
||||
}
|
||||
|
||||
HibernateUtil.shutdown();
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/Hibernate/hibernate/src/main/java/com/practice/Main.java","entries":[{"id":"xmoH.java","timestamp":1711948795894},{"id":"5ZOh.java","timestamp":1711949736100}]}
|
||||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/Hibernate/hibernate/src/main/java/com/practice/Main.java","entries":[{"id":"xmoH.java","timestamp":1711948795894},{"id":"5ZOh.java","timestamp":1711949736100},{"id":"1olJ.java","timestamp":1719139768326},{"id":"1EY6.java","timestamp":1719139798178},{"id":"1cY2.java","timestamp":1719393760907},{"id":"pAwP.java","timestamp":1719393820284},{"id":"QfQb.java","timestamp":1719393832925}]}
|
30
.config/Code/User/History/-45886119/pAwP.java
Normal file
30
.config/Code/User/History/-45886119/pAwP.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
package com.practice;
|
||||
|
||||
import org.hibernate.Transaction;
|
||||
|
||||
import org.hibernate.Session;
|
||||
|
||||
public class Main{
|
||||
public static void main(String[] args){
|
||||
|
||||
Session session = HibernateUtil.getSessionfactory().openSession();
|
||||
Transaction tx = null;
|
||||
try{
|
||||
tx = session.beginTransaction();
|
||||
Student newStudent = new Student(2340, "rafay", 3.14);
|
||||
session.save(newStudent);
|
||||
tx.commit();
|
||||
}
|
||||
catch(Exception e){
|
||||
if(tx != null){
|
||||
tx.rollback();
|
||||
}
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally{
|
||||
session.close();
|
||||
}
|
||||
|
||||
HibernateUtil.shutdown();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue