/** Rename a folder */ public static String renameFolder(Integer project, String folder, String newName) { Ebean.createSqlUpdate( "update task set folder = :newName where folder = :folder and project_id = :project") .setParameter("folder", folder) .setParameter("newName", newName) .setParameter("project", project) .execute(); return newName; }
/** Mark a task as done or not */ public static void markAsDone(Integer taskId, Boolean done) { /* Task task = Task.find.ref(taskId); task.done = done; task.update();*/ Ebean.createSqlUpdate("update task set done = :done where id = :id") .setParameter("id", taskId) .setParameter("done", done) .execute(); }