Package hu.lacimol.tutorial.todo.model

Examples of hu.lacimol.tutorial.todo.model.Comment


    final Todo todo = ao.create(Todo.class);
    todo.setDescription("Some todo");
    todo.save();

    Comment comment = ao.create(Comment.class);
    comment.setTodo(todo);
    comment.setText("Comment text 3");
    comment.save();

    comment = ao.create(Comment.class);
    comment.setTodo(todo);
    comment.setText("Comment text 4");
    comment.save();

    ao.flushAll(); // clear all caches

    final List<Todo> all = todoService.findAll();
    assertEquals(2, all.size());
View Full Code Here


      final Todo todo = em.create(Todo.class);
      todo.setDescription(TODO_DESC);
      todo.save();

      Comment comment = em.create(Comment.class);
      comment.setTodo(todo);
      comment.setText("Comment text 1");
      comment.save();

      comment = em.create(Comment.class);
      comment.setTodo(todo);
      comment.setText("Comment text 2");
      comment.save();
    }
View Full Code Here

    return newArrayList(ao.find(Todo.class, Query.select().where("description = ?", description)));
  }

  @Override
  public void addComment(Todo todo, String text) {
    Comment comment = ao.create(Comment.class);
    comment.setTodo(todo);
    comment.setText(text);
    comment.save();
  }
View Full Code Here

TOP

Related Classes of hu.lacimol.tutorial.todo.model.Comment

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.