@@ -0,0 +1,601 @@
+package DAO;%0A%0Aimport javax.persistence.EntityManager;%0Aimport javax.persistence.EntityManagerFactory;%0Aimport javax.persistence.Persistence;%0A%0Apublic class EM %7B%0A%0A%09static EntityManagerFactory entityManagerFactory;%0A%09static EntityManager em;%0A%0A%09private static void initEM() %7B%0A%09%09entityManagerFactory = Persistence.createEntityManagerFactory(%22EagleCatering%22);%0A%09%09em = entityManagerFactory.createEntityManager();%0A%09%7D%0A%0A%09public static EntityManager getEM() %7B%0A%09%09if (em == null) %7B%0A%09%09%09initEM();%0A%09%09%7D%0A%09%09return em;%0A%09%7D%0A%0A%09public static void close() %7B%0A%09%09em.close();%0A%09%09entityManagerFactory.close();%0A%09%7D%0A%0A%09private EM() %7B%0A%09%7D%0A%0A%7D%0A

add entity manager