public class

AsyncLinkedData

extends LinkedData<T extends LinkedGenericJson>
java.lang.Object
   ↳ com.kinvey.java.AppData<T>
     ↳ com.kinvey.java.LinkedData<T extends com.kinvey.java.LinkedResources.LinkedGenericJson>
       ↳ com.kinvey.android.AsyncLinkedData<T extends com.kinvey.java.LinkedResources.LinkedGenericJson>

Class Overview

Wraps the com.kinvey.java.LinkedData public methods in asynchronous functionality using native Android AsyncTask.

This functionality can be accessed through the linkedData(String, Class) convenience method. The first String parameter is the name of the Collection, and the Class is the expected Response Class.

The methods provided in this class take two (optional) callbacks, a KinveyClientCallback for the AppData request as well as a UploaderProgressListener or DownloaderProgressListener for updates on the File status

The functionality of this class is provided by both the com.kinvey.java.AppData API as well as the com.kinvey.java.File API.

Summary

[Expand]
Inherited Constants
From class com.kinvey.java.AppData
Public Methods
void get(Query query, KinveyListCallback<T> callback, DownloaderProgressListener download, String[] resolves, int resolve_depth, boolean retain)
Method to get an entity or entities and download ALL associated Linked Resources.
void get(Query query, KinveyListCallback<T> callback, DownloaderProgressListener download)
Method to get an entity or entities and download ALL associated Linked Resources.
void get(KinveyListCallback<T> callback, DownloaderProgressListener download)
Method to get an entity or entities and download ALL associated Linked Resources.
void getEntity(String entityID, KinveyClientCallback<T> callback, DownloaderProgressListener download)
Method to get an entity or entities and download a subset of associated Linked Resources.
void save(T entity, KinveyClientCallback<T> callback, UploaderProgressListener upload)
Save (create or update) an entity to a collection and upload ALL associated Linked Resources.
[Expand]
Inherited Methods
From class com.kinvey.java.LinkedData
From class com.kinvey.java.AppData
From class java.lang.Object

Public Methods

public void get (Query query, KinveyListCallback<T> callback, DownloaderProgressListener download, String[] resolves, int resolve_depth, boolean retain)

Method to get an entity or entities and download ALL associated Linked Resources.

Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener to retrieve callback information about the File downloads.

This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.

Parameters
query query for entities to retrieve
download - used for progress updates as associated files are downloaded.
Returns
  • Get object
Throws
IOException - if there is an issue executing the client requests

public void get (Query query, KinveyListCallback<T> callback, DownloaderProgressListener download)

Method to get an entity or entities and download ALL associated Linked Resources.

Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener to retrieve callback information about the File downloads.

This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.

Parameters
query query for entities to retrieve
download - used for progress updates as associated files are downloaded.
Returns
  • Get object
Throws
IOException - if there is an issue executing the client requests

public void get (KinveyListCallback<T> callback, DownloaderProgressListener download)

Method to get an entity or entities and download ALL associated Linked Resources.

Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener to retrieve callback information about the File downloads.

This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.

Parameters
download - used for progress updates as associated files are downloaded.
Returns
  • Get object
Throws
IOException - if there is an issue executing the client requests

public void getEntity (String entityID, KinveyClientCallback<T> callback, DownloaderProgressListener download)

Method to get an entity or entities and download a subset of associated Linked Resources.

Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener to retrieve callback information about the File downloads.

This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.

Parameters
entityID entityID to get
download - used for progress updates as associated files are downloaded.
Returns
  • Get object
Throws
IOException - if there is an issue executing the client requests

public void save (T entity, KinveyClientCallback<T> callback, UploaderProgressListener upload)

Save (create or update) an entity to a collection and upload ALL associated Linked Resources.

This method will only upload Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.

Parameters
entity Entity to Save
upload - Listener for uploading Linked Resources, can be null.
Returns
  • Save object
Throws
IOException - if there is an issue executing the client requests