Package com.tapestry5book.tlog.core.entities

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


            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"));
                article.setPublishDate(parseDate(attributes.getValue("publishDate")));
                article.setBlog(blog);
            }else if(localName.equals("user")){
                User user = new User();
View Full Code Here


    @Property
    private String message;

    void onPrepare() {
        if (article == null) {
            article = new Article();
        }
    }
View Full Code Here

        this.sessionManager.commit();
    }

    private void addTag(List<Article> articles, List<Tag> tags, int articleIndex, int tagIndex) {
        if (articleIndex < articles.size() && tagIndex < tags.size()) {
            Article article = articles.get(articleIndex);

            article.getTags().add(tags.get(tagIndex));
        }
    }
View Full Code Here

        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);
        article.setTitle("Hello world!");
        article.setContent("Hello world!");
        article.setPublishDate(new GregorianCalendar(2011, 0, 28).getTime());

        session.save(article);

        sessionManager.commit();
View Full Code Here

TOP

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

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.