Example usage for android.database Cursor getInt

List of usage examples for android.database Cursor getInt

Introduction

In this page you can find the example usage for android.database Cursor getInt.

Prototype

int getInt(int columnIndex);

Source Link

Document

Returns the value of the requested column as an int.

Usage

From source file:Main.java

public static int getInt(String columnName, Cursor cursor) {
    return cursor.getInt(cursor.getColumnIndexOrThrow(columnName));
}

From source file:Main.java

public static int getInt(Cursor cursor, String column) {
    return cursor.getInt(cursor.getColumnIndex(column));
}

From source file:Main.java

private static int getIntFromCursor(Cursor cursor, String columnName) {
    return cursor.getInt(cursor.getColumnIndex(columnName));
}

From source file:Main.java

public static boolean getBoolean(Cursor cursor, String columnName) {
    return cursor.getInt(cursor.getColumnIndex(columnName)) == 1 ? true : false;
}

From source file:Main.java

public static Integer statusInt(Cursor c) {
    return c.getInt(c.getColumnIndex(DownloadManager.COLUMN_STATUS));
}

From source file:Main.java

public static Integer reasonInt(Cursor c) {
    return c.getInt(c.getColumnIndex(DownloadManager.COLUMN_REASON));
}

From source file:Main.java

public static boolean getBooleanFromDBInt(Cursor c, String columnName) {
    return c.getInt(c.getColumnIndex(columnName)) == 1;
}

From source file:Main.java

private static Boolean readBoolean(Cursor cursor, int index) {
    return (cursor.getInt(index) == 1);
}

From source file:Main.java

public static int getInt(Cursor cursor, String columnName) {
    return cursor.getInt(cursor.getColumnIndexOrThrow(columnName));
}

From source file:Main.java

public static int getInt(@NonNull Cursor cursor, @NonNull String columnName) {
    return cursor.getInt(cursor.getColumnIndex(columnName));
}