Back to project page NexusData.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCT...
If you think the Android project NexusData listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.dkharrat.nexusdata.utils.android; //from ww w . j a v a 2 s . co m import android.database.Cursor; public class CursorUtil { public static short getShort(Cursor c, String columnName) { return c.getShort(c.getColumnIndex(columnName)); } public static int getInt(Cursor c, String columnName) { return c.getInt(c.getColumnIndex(columnName)); } public static long getLong(Cursor c, String columnName) { return c.getLong(c.getColumnIndex(columnName)); } public static String getString(Cursor c, String columnName) { return c.getString(c.getColumnIndex(columnName)); } public static boolean getBoolean(Cursor c, String columnName) { return c.getInt(c.getColumnIndex(columnName)) != 0; } public static float getFloat(Cursor c, String columnName) { return c.getFloat(c.getColumnIndex(columnName)); } public static double getDouble(Cursor c, String columnName) { return c.getDouble(c.getColumnIndex(columnName)); } public static boolean isNull(Cursor c, String columnName) { return c.isNull(c.getColumnIndex(columnName)); } }