Package sino.dao.jpa

Examples of sino.dao.jpa.PostDaoImpl.retrieve()


        post.setCreationDate(new Date());
        post.setType(PostType.NEWS);
        postDao.persist(post);
        postDao.getEntityManager().getTransaction().commit();
        postDao.setEntityManager(factory.createEntityManager());
        System.out.println(postDao.retrieve(post.getId()).getContent());
        System.out.println(postDao.retrieve(1).getPreview());
    }

    public void testB() throws Exception {
        ApplicationContext context = new ClassPathXmlApplicationContext("/config.xml");
View Full Code Here


        post.setType(PostType.NEWS);
        postDao.persist(post);
        postDao.getEntityManager().getTransaction().commit();
        postDao.setEntityManager(factory.createEntityManager());
        System.out.println(postDao.retrieve(post.getId()).getContent());
        System.out.println(postDao.retrieve(1).getPreview());
    }

    public void testB() throws Exception {
        ApplicationContext context = new ClassPathXmlApplicationContext("/config.xml");
        PostService postService = (PostService) context.getBean("postService");
View Full Code Here

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.