Package hu.lacimol.tutorial.todo.model

Examples of hu.lacimol.tutorial.todo.model.Comment.save()


    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();
View Full Code Here


    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

      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

      comment.save();

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

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

  @Override
  public Todo findById(int id) {
    //return ao.find(Todo.class, Query.select().where("id = ?", id);
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.