Example usage for android.database MatrixCursor getInt

List of usage examples for android.database MatrixCursor getInt

Introduction

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

Prototype

@Override
    public int getInt(int column) 

Source Link

Usage

From source file:com.nextgis.maplibui.control.PhotoGallery.java

public static void getAttaches(IGISApplication app, VectorLayer layer, long featureId, Map<String, Integer> map,
        boolean excludeSign) {
    Uri uri = Uri.parse("content://" + app.getAuthority() + "/" + layer.getPath().getName() + "/" + featureId
            + "/" + Constants.URI_ATTACH);
    MatrixCursor attachCursor = (MatrixCursor) layer.query(uri,
            new String[] { VectorLayer.ATTACH_DATA, VectorLayer.ATTACH_ID }, FIELD_ID + " = " + featureId, null,
            null, null);/*from  ww  w .  j  a  va 2 s  . c o m*/

    if (attachCursor.moveToFirst()) {
        do {
            if (excludeSign && attachCursor.getInt(1) == Integer.MAX_VALUE)
                continue;

            map.put(attachCursor.getString(0), attachCursor.getInt(1));
        } while (attachCursor.moveToNext());
    }

    attachCursor.close();
}