Package hu.lacimol.tutorial.todo.model

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


  public void testAll() throws Exception {
    assertEquals(1, todoService.findAll().size());

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


      System.out.println("--- Create test data ---");
      em.migrate(Todo.class, Comment.class);

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

  @Override
  public Todo create(String description) {
    final Todo todo = ao.create(Todo.class);
    todo.setDescription(description);
    todo.setComplete(false);
    todo.save();
    return todo;
  }

  @Override
  public List<Todo> findAll() {
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.