Project

General

Profile

Evolution #14912

Update ProviderAdapterBase, add limit & offset

Added by Erwan L. 6 months ago. Updated 4 months ago.

Status:
Résolu
Priority:
Normal
Assignee:
Category:
Core
Target version:
Start date:
05/06/2019
Due date:
% Done:

80%

Estimated time:
Bdc:
HARMONY

Description

Update ProviderAdapterBase template.
Add this constant :

    public static final String QUERY_PARAMETER_LIMIT = "limit";
    public static final String QUERY_PARAMETER_OFFSET = "offset";

Update query() method :
Add/Change this in case *_ALL :

    String limit = uri.getQueryParameter(QUERY_PARAMETER_LIMIT);
    String offset = uri.getQueryParameter(QUERY_PARAMETER_OFFSET);

    if (limit != null) {
        if (offset != null) {
            limit = String.format("%s,%s", offset, limit);
        }
    }

    result = this.adapter.query(
            projection,
            selection,
            selectionArgs,
            null,
            null,
            sortOrder,
            limit);


Recurrences

History

#1Updated by Jeremy C. 6 months ago

Appliqué par commit commit:origin|05ddbe40afab60cb67a09c2d4dc8d8fb5e50b6be.

Also available in: Atom PDF

Go to top
Add picture from clipboard (Maximum size: 200 MB)