|
|
|
@ -15,6 +15,7 @@ import com.todoroo.andlib.data.TodorooCursor;
|
|
|
|
|
import com.todoroo.andlib.service.Autowired;
|
|
|
|
|
import com.todoroo.andlib.service.DependencyInjectionService;
|
|
|
|
|
import com.todoroo.andlib.sql.Criterion;
|
|
|
|
|
import com.todoroo.andlib.sql.Field;
|
|
|
|
|
import com.todoroo.andlib.sql.Functions;
|
|
|
|
|
import com.todoroo.andlib.sql.Query;
|
|
|
|
|
import com.todoroo.andlib.utility.DateUtilities;
|
|
|
|
@ -78,6 +79,16 @@ public class TaskDao extends DatabaseDao<Task> {
|
|
|
|
|
Task.HIDE_UNTIL.lt(Functions.now()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** @return tasks that have not yet been completed or deleted and are assigned to me */
|
|
|
|
|
public static Criterion activeVisibleMine() {
|
|
|
|
|
return Criterion.and(Task.COMPLETION_DATE.eq(0),
|
|
|
|
|
Task.DELETION_DATE.eq(0),
|
|
|
|
|
Task.HIDE_UNTIL.lt(Functions.now()),
|
|
|
|
|
Field.field(Task.FLAGS.name + " & " + //$NON-NLS-1$
|
|
|
|
|
Task.FLAG_IS_READONLY).eq(0),
|
|
|
|
|
Task.USER_ID.eq(0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** @return tasks that have not yet been completed or deleted */
|
|
|
|
|
public static Criterion isActive() {
|
|
|
|
|
return Criterion.and(Task.COMPLETION_DATE.eq(0),
|
|
|
|
|