Package org.jpa

Source Code of org.jpa.Main

package org.jpa;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import org.jpa.Evaluare;


public final class Main {
    private Main(){}
    public static void main(String[] args) {
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("mewp");
        EntityManager em = emf.createEntityManager();

        Evaluare ev = new Evaluare();
        ev.setTipEvaluare("EXAMEN");
      
        em.getTransaction().begin();
        em.persist(ev);
        em.getTransaction().commit();
        em.close();
        emf.close();

    }

}
TOP

Related Classes of org.jpa.Main

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.