DmfsTaskList

class DmfsTaskList(val provider: DmfsTaskListProvider, val values: ContentValues, val providerName: TaskProvider.ProviderName)

Represents a locally stored task list, containing at.bitfire.ical4android.DmfsTasks (tasks). Communicates with tasks.org-compatible content providers (currently tasks.org and OpenTasks) to store the tasks.

Constructors

Link copied to clipboard
constructor(provider: DmfsTaskListProvider, values: ContentValues, providerName: TaskProvider.ProviderName)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun countTasks(where: String? = null, whereArgs: Array<String>? = null): Int

Counts the number of tasks in this task list that match the given selection criteria.

Link copied to clipboard

Calls DmfsTaskListProvider.delete for this task list

Link copied to clipboard
fun deleteTasks(where: String?, whereArgs: Array<String>?): Int

Deletes tasks in this task list.

Link copied to clipboard
fun findTasks(where: String? = null, whereArgs: Array<String>? = null): List<DmfsTask>

Queries tasks from this task list. Adds a WHERE clause that restricts the query to TaskContract.TaskColumns.LIST_ID = id.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun tasksUri(loadProperties: Boolean = false): Uri
Link copied to clipboard
fun taskUri(id: Long, loadProperties: Boolean = false): Uri
Link copied to clipboard

When tasks are added or updated, they may refer to related tasks by UID (TaskContract.Property.Relation.RELATED_UID). However, those related tasks may not be available (for instance, because they have not been synchronized yet), so that the tasks provider can't establish the actual relation (= set TaskContract.PropertyColumns.TASK_ID) in the database.

Link copied to clipboard
fun update(values: ContentValues): Int

Calls DmfsTaskListProvider.updateTaskList for this task list.

Link copied to clipboard
fun updateTasks(values: ContentValues, where: String?, whereArgs: Array<String>?): Int

Updates tasks in this task list.

Link copied to clipboard