Package org.jboss.test.jpa.support

Examples of org.jboss.test.jpa.support.TestEntity


            EntityManager em = (EntityManager) ctx.lookup("java:comp/env/persistence/em");
           
            String mode = req.getParameter("mode");
            if ("Write".equals(mode))
            {
               TestEntity test = new TestEntity("Hello", "World");
               em.persist(test);
            }
            else
            {
               TestEntity test = em.find(TestEntity.class, "Hello");
               resp.setContentType("text/plain");
               PrintWriter out = resp.getWriter();
               out.print(test.getDescription());
               out.close();
            }
         }
         catch (Exception e)
         {
View Full Code Here


            EntityManager em = (EntityManager) ctx.lookup("java:comp/env/persistence/em");
           
            String mode = req.getParameter("mode");
            if ("Write".equals(mode))
            {
               TestEntity test = new TestEntity("Hello", "World");
               em.persist(test);
            }
            else
            {
               TestEntity test = em.find(TestEntity.class, "Hello");
               resp.setContentType("text/plain");
               PrintWriter out = resp.getWriter();
               out.print(test.getDescription());
               out.close();
            }
         }
         catch (Exception e)
         {
View Full Code Here

TOP

Related Classes of org.jboss.test.jpa.support.TestEntity

Copyright © 2018 www.massapicom. 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.