/** Create a task */ public static Task create(Integer project, String folder, String title) { Task task = new Task(); task.project = Project.find.ref(project); task.folder = folder; task.title = title; task.save(); return task; }
@Override public boolean equals(Object o) { if (o == null || !(o instanceof Task)) return false; Task task2 = (Task) o; return id.equals(task2.getId()); }
public static Task create(Task task, Long project, String folder) { task.project = Project.find.ref(project); task.folder = folder; task.save(); return task; }