Added in API level 1

MergeCursor


open class MergeCursor : AbstractCursor
kotlin.Any
   ↳ android.database.AbstractCursor
   ↳ android.database.MergeCursor

A convenience class that lets you present an array of Cursors as a single linear Cursor. The schema of the cursors presented is entirely up to the creator of the MergeCursor, and may be different if that is desired. Calls to getColumns, getColumnIndex, etc will return the value for the row that the MergeCursor is currently pointing at.

Summary

Public constructors
MergeCursor(cursors: Array<Cursor!>!)

Public methods
open Unit

open Unit

open ByteArray!
getBlob(column: Int)

open Array<String!>!

open Int

open Double
getDouble(column: Int)

open Float
getFloat(column: Int)

open Int
getInt(column: Int)

open Long
getLong(column: Int)

open Short
getShort(column: Int)

open String!
getString(column: Int)

open Int
getType(column: Int)

open Boolean
isNull(column: Int)

open Boolean
onMove(oldPosition: Int, newPosition: Int)

open Unit

open Unit

open Boolean

open Unit

open Unit

Inherited functions
Inherited properties

Public constructors

MergeCursor

Added in API level 1
MergeCursor(cursors: Array<Cursor!>!)

Public methods

close

Added in API level 1
open fun close(): Unit
Exceptions
java.lang.Exception if this resource cannot be closed
java.io.IOException if an I/O error occurs

deactivate

Added in API level 1
open fun deactivate(): Unit

getBlob

Added in API level 1
open fun getBlob(column: Int): ByteArray!
Parameters
columnIndex the zero-based index of the target column. Value is 0 or greater
Return
ByteArray! the value of that column as a byte array.

getColumnNames

Added in API level 1
open fun getColumnNames(): Array<String!>!
Return
Array<String!>! the names of the columns returned in this query.

getCount

Added in API level 1
open fun getCount(): Int
Return
Int the number of rows in the cursor. Value is 0 or greater

getDouble

Added in API level 1
open fun getDouble(column: Int): Double
Parameters
columnIndex the zero-based index of the target column. Value is 0 or greater
Return
Double the value of that column as a double.

getFloat

Added in API level 1
open fun getFloat(column: Int): Float
Parameters
columnIndex the zero-based index of the target column. Value is 0 or greater
Return
Float the value of that column as a float.

getInt

Added in API level 1
open fun getInt(column: Int): Int
Parameters
columnIndex the zero-based index of the target column. Value is 0 or greater
Return
Int the value of that column as an int.

getLong

Added in API level 1
open fun getLong(column: Int): Long
Parameters
columnIndex the zero-based index of the target column. Value is 0 or greater
Return
Long the value of that column as a long.

getShort

Added in API level 1
open fun getShort(column: Int): Short
Parameters
columnIndex the zero-based index of the target column. Value is 0 or greater
Return
Short the value of that column as a short.

getString

Added in API level 1
open fun getString(column: Int): String!
Parameters
columnIndex the zero-based index of the target column. Value is 0 or greater
Return
String! the value of that column as a String.

getType

Added in API level 11
open fun getType(column: Int): Int
Parameters
columnIndex the zero-based index of the target column. Value is 0 or greater
Return
Int column value type Value is android.database.Cursor#FIELD_TYPE_NULL, android.database.Cursor#FIELD_TYPE_INTEGER, android.database.Cursor#FIELD_TYPE_FLOAT, android.database.Cursor#FIELD_TYPE_STRING, or android.database.Cursor#FIELD_TYPE_BLOB

isNull

Added in API level 1
open fun isNull(column: Int): Boolean
Parameters
columnIndex the zero-based index of the target column. Value is 0 or greater
Return
Boolean whether the column value is null.

onMove

Added in API level 1
open fun onMove(
    oldPosition: Int,
    newPosition: Int
): Boolean
Parameters
oldPosition Int: the position that we're moving from
newPosition Int: the position that we're moving to
Return
Boolean true if the move is successful, false otherwise

registerContentObserver

Added in API level 1
open fun registerContentObserver(observer: ContentObserver!): Unit
Parameters
observer ContentObserver!: the object that gets notified when the content backing the cursor changes.

registerDataSetObserver

Added in API level 1
open fun registerDataSetObserver(observer: DataSetObserver!): Unit
Parameters
observer DataSetObserver!: the object that gets notified when the cursors data set changes.

requery

Added in API level 1
open fun requery(): Boolean
Return
Boolean true if the requery succeeded, false if not, in which case the cursor becomes invalid.

unregisterContentObserver

Added in API level 1
open fun unregisterContentObserver(observer: ContentObserver!): Unit
Parameters
observer ContentObserver!: the object to unregister.

unregisterDataSetObserver

Added in API level 1
open fun unregisterDataSetObserver(observer: DataSetObserver!): Unit
Parameters
observer DataSetObserver!: the object to unregister.