Example usage for android.database MatrixCursor moveToNext

List of usage examples for android.database MatrixCursor moveToNext

Introduction

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

Prototype

@Override
    public final boolean moveToNext() 

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);/*  w  ww  . ja  v a 2  s.  com*/

    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();
}