DmfsTask

class DmfsTask(val taskList: DmfsTaskList, val values: Entity)

Stores and retrieves tasks to/from the tasks.org-content provider (currently tasks.org and OpenTasks).

A task in the context of this class is one row in the org.dmfs.tasks.contract.TaskContract.Tasks table, plus associated data rows (like alarms and reminders).

The SEQUENCE field is stored in org.dmfs.tasks.contract.TaskContract.CommonSyncColumns.SYNC_VERSION, so don't use it for anything else.

Parameters

taskList

task list where the task is stored

values

entity with all columns, as returned by the task provider; org.dmfs.tasks.contract.TaskContract.Tasks._ID must be set to a non-null value for existing tasks, and may be absent for new (unsaved) tasks

Constructors

Link copied to clipboard
constructor(taskList: DmfsTaskList, values: Entity)
constructor(taskList: DmfsTaskList, task: Task, syncId: String?, eTag: String?, flags: Int)

Secondary constructor for creating a new (not yet saved) task.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var eTag: String?
Link copied to clipboard
var flags: Int
Link copied to clipboard
var id: Long?
Link copied to clipboard
Link copied to clipboard
var task: Task?
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun add(): Uri

Saves the unsaved task into the task provider storage.

Link copied to clipboard
fun delete(): Int

Deletes an existing task from the tasks provider storage.

Link copied to clipboard
fun update(values: ContentValues)

fun update(task: Task): Uri

Updates an already existing task in the tasks provider storage with the values from the instance.