如何一次获得50多行Windows Azure Android

时间:2014-07-10 23:22:25

标签: java android azure

我有一个大约115行的Azure表,我想在Android上一次加载所有这些。它限制我50个项目,但我知道在C#中你可以使用Take(n)来达到1000.这相当于Android的什么?这是我目前的代码:

parameterTable.where().execute(new TableQueryCallback<Parameter>() {
            @Override
            public void onCompleted(List<Parameter> result, int count,
                    Exception exception, ServiceFilterResponse response) {
                if (exception != null) {
                    Log.e(TAG, exception.getCause().getMessage());
                    return;
                }
                for(Parameter p : result){
                    parameterList.add(p);
                }
                Intent broadcast = new Intent();
                broadcast.setAction("tables.loaded");
                Shared.sendBroadcast(broadcast);
            }
        });

1 个答案:

答案 0 :(得分:1)

等效于顶部

parameterTable.where().top(1000).execute(new TableQueryCallback<Parameter>()
            @Override
            public void onCompleted(List<Parameter> result, int count,
                    Exception exception, ServiceFilterResponse response) {
                if (exception != null) {
                    Log.e(TAG, exception.getCause().getMessage());
                    return;
                }
                for(Parameter p : result){
                    parameterList.add(p);
                }
                Intent broadcast = new Intent();
                broadcast.setAction("tables.loaded");
                Shared.sendBroadcast(broadcast);
            }
        });

http://azure.microsoft.com/en-us/documentation/articles/mobile-services-android-how-to-use-client-library/#paging