IT. Expert System.

Android Reference

MergeCursor


android.database

Class MergeCursor

  • All Implemented Interfaces:
    CrossProcessCursor, Cursor, Closeable, AutoCloseable


    public class MergeCursor
    extends AbstractCursor
    A convience 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.
    • Constructor Detail

      • MergeCursor

        public MergeCursor(Cursor[] cursors)
    • Method Detail

      • getCount

        public int getCount()
        Description copied from interface: Cursor
        Returns the numbers of rows in the cursor.
        Specified by:
        getCount in interface Cursor
        Specified by:
        getCount in class AbstractCursor
        Returns:
        the number of rows in the cursor.
      • onMove

        public boolean onMove(int oldPosition,
                     int newPosition)
        Description copied from class: AbstractCursor
        This function is called every time the cursor is successfully scrolled to a new position, giving the subclass a chance to update any state it may have. If it returns false the move function will also do so and the cursor will scroll to the beforeFirst position.
        Specified by:
        onMove in interface CrossProcessCursor
        Overrides:
        onMove in class AbstractCursor
        Parameters:
        oldPosition - the position that we're moving from
        newPosition - the position that we're moving to
        Returns:
        true if the move is successful, false otherwise
      • getString

        public String getString(int column)
        Description copied from interface: Cursor
        Returns the value of the requested column as a String.

        The result and whether this method throws an exception when the column value is null or the column type is not a string type is implementation-defined.

        Specified by:
        getString in interface Cursor
        Specified by:
        getString in class AbstractCursor
        Parameters:
        column - the zero-based index of the target column.
        Returns:
        the value of that column as a String.
      • getShort

        public short getShort(int column)
        Description copied from interface: Cursor
        Returns the value of the requested column as a short.

        The result and whether this method throws an exception when the column value is null, the column type is not an integral type, or the integer value is outside the range [Short.MIN_VALUE, Short.MAX_VALUE] is implementation-defined.

        Specified by:
        getShort in interface Cursor
        Specified by:
        getShort in class AbstractCursor
        Parameters:
        column - the zero-based index of the target column.
        Returns:
        the value of that column as a short.
      • getInt

        public int getInt(int column)
        Description copied from interface: Cursor
        Returns the value of the requested column as an int.

        The result and whether this method throws an exception when the column value is null, the column type is not an integral type, or the integer value is outside the range [Integer.MIN_VALUE, Integer.MAX_VALUE] is implementation-defined.

        Specified by:
        getInt in interface Cursor
        Specified by:
        getInt in class AbstractCursor
        Parameters:
        column - the zero-based index of the target column.
        Returns:
        the value of that column as an int.
      • getLong

        public long getLong(int column)
        Description copied from interface: Cursor
        Returns the value of the requested column as a long.

        The result and whether this method throws an exception when the column value is null, the column type is not an integral type, or the integer value is outside the range [Long.MIN_VALUE, Long.MAX_VALUE] is implementation-defined.

        Specified by:
        getLong in interface Cursor
        Specified by:
        getLong in class AbstractCursor
        Parameters:
        column - the zero-based index of the target column.
        Returns:
        the value of that column as a long.
      • getFloat

        public float getFloat(int column)
        Description copied from interface: Cursor
        Returns the value of the requested column as a float.

        The result and whether this method throws an exception when the column value is null, the column type is not a floating-point type, or the floating-point value is not representable as a float value is implementation-defined.

        Specified by:
        getFloat in interface Cursor
        Specified by:
        getFloat in class AbstractCursor
        Parameters:
        column - the zero-based index of the target column.
        Returns:
        the value of that column as a float.
      • getDouble

        public double getDouble(int column)
        Description copied from interface: Cursor
        Returns the value of the requested column as a double.

        The result and whether this method throws an exception when the column value is null, the column type is not a floating-point type, or the floating-point value is not representable as a double value is implementation-defined.

        Specified by:
        getDouble in interface Cursor
        Specified by:
        getDouble in class AbstractCursor
        Parameters:
        column - the zero-based index of the target column.
        Returns:
        the value of that column as a double.
      • isNull

        public boolean isNull(int column)
        Description copied from interface: Cursor
        Returns true if the value in the indicated column is null.
        Specified by:
        isNull in interface Cursor
        Specified by:
        isNull in class AbstractCursor
        Parameters:
        column - the zero-based index of the target column.
        Returns:
        whether the column value is null.
      • getBlob

        public byte[] getBlob(int column)
        Description copied from interface: Cursor
        Returns the value of the requested column as a byte array.

        The result and whether this method throws an exception when the column value is null or the column type is not a blob type is implementation-defined.

        Specified by:
        getBlob in interface Cursor
        Overrides:
        getBlob in class AbstractCursor
        Parameters:
        column - the zero-based index of the target column.
        Returns:
        the value of that column as a byte array.
      • getColumnNames

        public String[] getColumnNames()
        Description copied from interface: Cursor
        Returns a string array holding the names of all of the columns in the result set in the order in which they were listed in the result.
        Specified by:
        getColumnNames in interface Cursor
        Specified by:
        getColumnNames in class AbstractCursor
        Returns:
        the names of the columns returned in this query.
      • requery

        public boolean requery()
        Description copied from interface: Cursor
        Performs the query that created the cursor again, refreshing its contents. This may be done at any time, including after a call to Cursor.deactivate(). Since this method could execute a query on the database and potentially take a while, it could cause ANR if it is called on Main (UI) thread. A warning is printed if this method is being executed on Main thread.
        Specified by:
        requery in interface Cursor
        Overrides:
        requery in class AbstractCursor
        Returns:
        true if the requery succeeded, false if not, in which case the cursor becomes invalid.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 94 / 158681202. Delta: 0.04180 с