Package com.tapestry5book.tlog.core.entities

Examples of com.tapestry5book.tlog.core.entities.Blog


                                 Attributes attributes) throws SAXException {

            logger.info(localName);

            if (localName.equals("blog")) {
                blog = new Blog();
                blog.setName(attributes.getValue("name"));
                blog.setDescription(attributes.getValue("description"));
            } else if (localName.equals("article")) {
                article = new Article();
                article.setTitle(attributes.getValue("title"));
View Full Code Here


        DemoDataParser.DemoData demoData = demoDataParser.parse(getClass().getResource("demodata.xml"));


        persistAll(demoData.getUsers());

        final Blog blog = demoData.getBlog();
        persistBlog(blog);

        List<Tag> tags = demoData.getTags();
        persistAll(tags);
View Full Code Here

        DemoDataParser parser = new DemoDataParser(LoggerFactory.getLogger(DemoDataParser.class));


        DemoDataParser.DemoData demoData = parser.parse(DemoDataParser.class.getResource("demodata.xml"));

        Blog blog = demoData.getBlog();

        assertEquals(blog.getName(), "Tapestry 5 Blog");
        assertEquals(blog.getDescription(), "Thoughts on coding, technology and occasional stuff");


        List<Article> articles = demoData.getArticles();

        assertEquals(articles.size(), 2);
View Full Code Here

    public void test() {
        HibernateSessionManager sessionManager = tester.getService(HibernateSessionManager.class);

        Session session = sessionManager.getSession();

        final Blog blog = new Blog();
        blog.setName("Tapestry 5 Blog");
        blog.setDescription("Thoughts on coding, technology and occasional stuff");

        sessionManager.getSession().save(blog);

        Article article = new Article();
        article.setBlog(blog);
View Full Code Here

TOP

Related Classes of com.tapestry5book.tlog.core.entities.Blog

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.