public class

AsyncAppDataOperation

extends AppDataOperation
java.lang.Object
   ↳ com.kinvey.java.AppDataOperation
     ↳ com.kinvey.android.AsyncAppDataOperation

Class Overview

Builder for asynchronous app data requests.

This class uses the Builder pattern to allow extensible use of all the features of our Android async app data API. There are various `set*()` methods, which can be chained together to create a builder. Once the builder has been configured, a call to `myBuilder.build()` will return an asyncronous request. By calling `myBuilder.build().execute()` the the request will be constructed and executed on a new thread. The builders provides `setCallback(new KinveyClientCallback{...})` for getting results of asynchronous operaitons.

`myBuilder.build()` returns an asyncronous request for app data from a collection. This class provides multiple implementations for various CRUD interactions.

The code below will build and execute an asyncronous get entity request.

 MyEntity myEntity = new BlockingGetEntityBuilder("myCollection", MyEntity.class, AppData.this)
             .setEntityID(myEntity.getId());
             .setResolves(new String[]{"myOtherCollectionReference1", myOtherCollectionReference2)
             .setResolveDepth(2)
             .setCallback(new KinveyClientCallback {
                 public void onSuccess(MyEntity result) {
                     Log.i(TAG, "got it!");
                 }

                 public void onFailure(Throwable error) {
                     Log.i(TAG, "oh no!");
                 }
             })
             .buildAndExecute();
 }
 

Summary

Public Constructors
AsyncAppDataOperation()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AsyncAppDataOperation ()