JtxCollection

class JtxCollection(val provider: JtxCollectionProvider, val values: ContentValues)

Represents a locally stored jtx collection (journals, notes, tasks). Communicates with the jtx Board content provider via provider.

Methods that use ContentValues operate directly on rows of the JtxContract.JtxICalObject table. Methods that use Entity operate on JtxContract.JtxICalObject rows together with associated sub-rows (attendees, categories, alarms, etc.).

Parameters

provider

jtx collection provider

values

content values as read from the jtx Board provider; JtxContract.JtxCollection.ID must be set

Throws

Constructors

Link copied to clipboard
constructor(provider: JtxCollectionProvider, values: ContentValues)

Types

Link copied to clipboard
object Companion

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
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun addJtxObject(entity: Entity): Long

Inserts a new jtx object into this collection.

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

Counts jtx objects in this collection that match the given selection criteria.

Link copied to clipboard
fun delete(): Int

Deletes this collection from the jtx Board content provider.

Link copied to clipboard

Deletes all jtx objects of this collection from the local storage.

Link copied to clipboard

Deletes a jtx object row. The jtx Board provider automatically deletes associated sub-rows.

Link copied to clipboard
fun findJtxObject(where: String?, whereArgs: Array<String>?, sortOrder: String? = null): Entity?

Gets the first object from this jtx collection that matches the given query.

Link copied to clipboard
fun findJtxObjectRow(projection: Array<String>?, where: String?, whereArgs: Array<String>?): ContentValues?

Gets the first jtx object row (without sub-rows) that matches the given query.

Link copied to clipboard
fun findJtxObjects(where: String?, whereArgs: Array<String>?): List<Entity>

Queries jtx objects from this jtx collection.

Link copied to clipboard

Gets a specific jtx object, identified by its ID, from this collection.

Link copied to clipboard
fun getJtxObjectRow(id: Long, projection: Array<String>? = null, where: String? = null, whereArgs: Array<String>? = null): ContentValues?

Gets the main row of a specific jtx object, identified by its ID, from this collection.

Link copied to clipboard
fun iterateJtxObjectRows(projection: Array<String>?, where: String?, whereArgs: Array<String>?, body: (ContentValues) -> Unit)

Iterates jtx object rows (without sub-rows) from this collection.

Link copied to clipboard
fun iterateJtxObjects(where: String?, whereArgs: Array<String>?, body: (Entity) -> Unit)

Iterates jtx objects (with sub-rows) from this collection.

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

Updates this collection in the jtx Board content provider.

Link copied to clipboard
fun updateJtxObject(id: Long, entity: Entity)

Updates a jtx object's main row and refreshes all sub-rows.

fun updateJtxObject(id: Long, entity: Entity, batch: JtxBatchOperation)

Enqueues an update of a jtx object's main row and refreshes all sub-rows into batch.

Link copied to clipboard

Updates a specific jtx object's main row with the given values. Doesn't influence sub-rows.

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

Updates jtx object rows in this collection.