public class

LinkedData

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

Class Overview

Subset of the AppData API, offering support for downloading and uploading associated files with an entity.

Files are automatically downloaded and uploaded when the entity is saved or retrieved. To enable this functionality ensure your Entity extends LinkedGenericJson instead of the usual GenericJson

Summary

Nested Classes
class LinkedData.Get Generic Get class, extends AbstractKinveyJsonClientRequest
class LinkedData.GetEntity Generic Get class, extends AbstractKinveyJsonClientRequest
class LinkedData.Save Generic Save class, extends AbstractKinveyJsonClientRequest
[Expand]
Inherited Constants
From class com.kinvey.java.AppData
Public Methods
Get getBlocking(DownloaderProgressListener download)
Method to get an entity or entities and download ALL associated Linked Resources.
Get getBlocking(Query query, DownloaderProgressListener download, String[] attachments)
Method to get an entity or entities and download ALL associated Linked Resources.
Get getBlocking(Query query, DownloaderProgressListener download, String[] attachments, String[] resolves)
Method to get entities by query and download ALL associated Linked Resources, with wrapped control over KinveyReferencess

Use the DownloaderProgressListener to retrieve callback information about the File downloads.

Get getBlocking(DownloaderProgressListener download, String[] attachments)
Method to get an entity or entities and download ALL associated Linked Resources.
Get getBlocking(Query query, DownloaderProgressListener download, String[] attachments, String[] resolves, int resolve_depth, boolean retain)
Method to get an entity or entities and download ALL associated Linked Resources, with complete control over KinveyReferencess

Pass null to entityID to return all entities in a collection.

Get getBlocking(Query query, DownloaderProgressListener download)
Method to get an entity or entities and download ALL associated Linked Resources.
GetEntity getEntityBlocking(String entityID, DownloaderProgressListener download)
Method to get an entity or entities and download ALL associated Linked Resources.
GetEntity getEntityBlocking(String entityID, DownloaderProgressListener download, String[] attachments)
Method to get an entity or entities and download a subset of associated Linked Resources.
Save saveBlocking(T entity, UploaderProgressListener upload, String[] attachments)
Save (create or update) an entity to a collection and upload ALL associated Linked Resources.
Save saveBlocking(T entity, 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.AppData
From class java.lang.Object

Public Methods

public Get getBlocking (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 download all associated Linked Resources and could take a long time. For more control when handling a large number of Linked Resources, try using an overloaded variation of this method.

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 Get getBlocking (Query query, DownloaderProgressListener download, String[] attachments)

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.
attachments - array of JSON keys of resources to retrieve
Returns
  • Get object
Throws
IOException - if there is an issue executing the client requests

public Get getBlocking (Query query, DownloaderProgressListener download, String[] attachments, String[] resolves)

Method to get entities by query and download ALL associated Linked Resources, with wrapped control over KinveyReferencess

Use the DownloaderProgressListener to retrieve callback information about the File downloads.

Parameters
query query for entities to retrieve
download - used for progress updates as associated files are downloaded.
attachments which json fields are linked resources that should be resolved
resolves a string array of json field names to resolve as kinvey references
Returns
  • Get object
Throws
IOException - if there is an issue executing the client requests

public Get getBlocking (DownloaderProgressListener download, String[] attachments)

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.
attachments - array of JSON keys of resources to retrieve
Returns
  • Get object
Throws
IOException - if there is an issue executing the client requests

public Get getBlocking (Query query, DownloaderProgressListener download, String[] attachments, String[] resolves, int resolve_depth, boolean retain)

Method to get an entity or entities and download ALL associated Linked Resources, with complete control over KinveyReferencess

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

Parameters
query query for entities to retrieve
download - used for progress updates as associated files are downloaded.
attachments which json fields are linked resources that should be resolved
resolves a string array of json field names to resolve as kinvey references
resolve_depth how many levels of kinvey references to resolve
retain should the resolved values be retained?
Returns
  • Get object
Throws
IOException - if there is an issue executing the client requests

public Get getBlocking (Query query, 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 download all associated Linked Resources and could take a long time. For more control when handling a large number of Linked Resources, try using an overloaded variation of this method.

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 GetEntity getEntityBlocking (String entityID, 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 download all associated Linked Resources and could take a long time. For more control when handling a large number of Linked Resources, try using an overloaded variation of this method.

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 GetEntity getEntityBlocking (String entityID, DownloaderProgressListener download, String[] attachments)

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.
attachments - array of JSON keys of resources to retrieve
Returns
  • Get object
Throws
IOException - if there is an issue executing the client requests

public Save saveBlocking (T entity, UploaderProgressListener upload, String[] attachments)

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 attachments 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.
attachments - array of JSON keys of resources to retrieve
Returns
  • Save object
Throws
IOException - if there is an issue executing the client requests

public Save saveBlocking (T entity, UploaderProgressListener upload)

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

This method will download all associated Linked Resources and could take a long time. For more control when handling a large number of Linked Resources, try using an overloaded variation of this method.

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