public class

AppData

extends Object
java.lang.Object
   ↳ com.kinvey.java.AppData<T>
Known Direct Subclasses

Class Overview

Class for managing appData access to the Kinvey backend.

Summary

Nested Classes
class AppData.Aggregate Generic Aggregate class, extends AbstractKinveyJsonClientRequest
class AppData.Delete Generic Delete class, extends AbstractKinveyJsonClientRequest
class AppData.Get Generic Get class, extends AbstractKinveyJsonClientRequest
class AppData.GetEntity Generic Get class, extends AbstractKinveyJsonClientRequest
class AppData.Save Generic Save class, extends AbstractKinveyJsonClientRequest
Constants
String GEOLOC_FIELD_NAME
String ID_FIELD_NAME
Public Methods
Aggregate average(ArrayList<String> fields, String averageField, Query query)
This method is deprecated. Renamed to averageBlocking(java.util.ArrayList, String, Query)
Aggregate averageBlocking(ArrayList<String> fields, String averageField, Query query)
Retrieve a group by AVERAGE on a collection or filtered collection@return
AppDataOperation.BlockingDeleteBuilder blockingDeleteBuilder()
Create and return a new synchronous App Data Request Builder associated with *this* instance of AppData.
AppDataOperation.BlockingGetBuilder blockingGetBuilder()
Create and return a new synchronous App Data Request Builder associated with *this* instance of AppData.
AppDataOperation.BlockingSaveBuilder blockingSaveBuilder()
Create and return a new synchronous App Data Request Builder associated with *this* instance of AppData.
Aggregate count(ArrayList<String> fields, Query query)
This method is deprecated. Renamed to countBlocking(java.util.ArrayList, Query)
Aggregate countBlocking(ArrayList<String> fields, Query query)
Retrieve a group by COUNT on a collection or filtered collection
Delete delete(Query query)
This method is deprecated. Renamed to deleteBlocking(String)
Delete delete(String entityID)
This method is deprecated. Renamed to deleteBlocking(String)
Delete deleteBlocking(Query query)
Delete an entity from a collection by Query.
Delete deleteBlocking(String entityID)
Delete an entity from a collection by ID.
Get get()
This method is deprecated. Renamed to getBlocking()
Get get(Query query)
This method is deprecated. Renamed to getBlocking(Query)
Get getBlocking(Query query)
Method to get a query of entities.
Get getBlocking()
Method to get all entities in a collection.
Get getBlocking(String[] ids)
Method to get a query of entities.
Get getBlocking(Query query, String[] resolves, int resolve_depth, boolean retain)
Method to get an entity or entities.
GetEntity getEntity(String entityID)
This method is deprecated. Renamed to getEntityBlocking(String)
GetEntity getEntityBlocking(String entityID)
Method to get an entity or entities.
GetEntity getEntityBlocking(String entityID, String[] resolves, int resolve_depth, boolean retain)
Method to get an entity or entities.
Aggregate max(ArrayList<String> fields, String maxField, Query query)
This method is deprecated. Renamed to maxBlocking(java.util.ArrayList, String, Query)
Aggregate maxBlocking(ArrayList<String> fields, String maxField, Query query)
Retrieve a group by MAX on a collection or filtered collection@return
Aggregate min(ArrayList<String> fields, String minField, Query query)
This method is deprecated. Renamed to minBlocking(java.util.ArrayList, String, Query)
Aggregate minBlocking(ArrayList<String> fields, String minField, Query query)
Retrieve a group by MIN on a collection or filtered collection@return
Query query()
Creates a new instance of Query
Save save(T entity)
This method is deprecated. Renamed to saveBlocking(Object)
Save saveBlocking(T entity)
Save (create or update) an entity to a collection.
void setCache(Cache cache, CachePolicy policy)
Define a cache as well as the policy to use when interacting with the cache
void setCollectionName(String collectionName)
Sets the collectionName
Aggregate sum(ArrayList<String> fields, String sumField, Query query)
This method is deprecated. Renamed to sumBlocking(java.util.ArrayList, String, Query)
Aggregate sumBlocking(ArrayList<String> fields, String sumField, Query query)
Retrieve a group by SUM on a collection or filtered collection@return
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String GEOLOC_FIELD_NAME

Constant Value: "_geoloc"

public static final String ID_FIELD_NAME

Constant Value: "_id"

Public Methods

public Aggregate average (ArrayList<String> fields, String averageField, Query query)

This method is deprecated.
Renamed to averageBlocking(java.util.ArrayList, String, Query)

Retrieve a group by AVERAGE on a collection or filtered collection@return

Parameters
fields fields to group by
averageField field to average
query optional query to filter by (null for all records in a collection)
Throws
IOException
IOException

public Aggregate averageBlocking (ArrayList<String> fields, String averageField, Query query)

Retrieve a group by AVERAGE on a collection or filtered collection@return

Parameters
fields fields to group by
averageField field to average
query optional query to filter by (null for all records in a collection)
Throws
IOException

public AppDataOperation.BlockingDeleteBuilder blockingDeleteBuilder ()

Create and return a new synchronous App Data Request Builder associated with *this* instance of AppData.

Returns
  • a new request builder for a blocking DELETE operation

public AppDataOperation.BlockingGetBuilder blockingGetBuilder ()

Create and return a new synchronous App Data Request Builder associated with *this* instance of AppData.

Returns
  • a new request builder for a blocking GET operation

public AppDataOperation.BlockingSaveBuilder blockingSaveBuilder ()

Create and return a new synchronous App Data Request Builder associated with *this* instance of AppData.

Returns
  • a new request builder for a blocking SAVE (put or post) operation

public Aggregate count (ArrayList<String> fields, Query query)

This method is deprecated.
Renamed to countBlocking(java.util.ArrayList, Query)

Retrieve a group by COUNT on a collection or filtered collection

Parameters
fields fields to group by
query optional query to filter by (null for all records in a collection)
Returns
  • Aggregate object
Throws
IOException
IOException

public Aggregate countBlocking (ArrayList<String> fields, Query query)

Retrieve a group by COUNT on a collection or filtered collection

Parameters
fields fields to group by
query optional query to filter by (null for all records in a collection)
Returns
  • Aggregate object
Throws
IOException

public Delete delete (Query query)

This method is deprecated.
Renamed to deleteBlocking(String)

Delete an entity from a collection by Query.

Parameters
query query for entities to delete
Returns
  • Delete object
Throws
IOException
IOException

public Delete delete (String entityID)

This method is deprecated.
Renamed to deleteBlocking(String)

Delete an entity from a collection by ID.

Parameters
entityID entityID to delete
Returns
  • Delete object
Throws
IOException
IOException

public Delete deleteBlocking (Query query)

Delete an entity from a collection by Query.

Parameters
query query for entities to delete
Returns
  • Delete object
Throws
IOException

public Delete deleteBlocking (String entityID)

Delete an entity from a collection by ID.

Parameters
entityID entityID to delete
Returns
  • Delete object
Throws
IOException

public Get get ()

This method is deprecated.
Renamed to getBlocking()

Method to get all entities in a collection.

Returns
  • Get Object
Throws
IOException
IOException

public Get get (Query query)

This method is deprecated.
Renamed to getBlocking(Query)

Method to get a query of entities. Pass an empty query to return all entities in a collection.

Parameters
query Query to get
Returns
  • Get object
Throws
IOException

public Get getBlocking (Query query)

Method to get a query of entities. Pass an empty query to return all entities in a collection.

Parameters
query Query to get
Returns
  • Get object
Throws
IOException

public Get getBlocking ()

Method to get all entities in a collection.

Returns
  • Get Object
Throws
IOException

public Get getBlocking (String[] ids)

Method to get a query of entities. Pass an array of entity _ids to return the entites.

Parameters
ids array of _ids to query for
Returns
  • Get object
Throws
IOException

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

Method to get an entity or entities. Pass null to entityID to return all entities in a collection.

Parameters
query Query to get
resolves list of KinveyReference fields to resolve
resolve_depth the depth of KinveyReferences fields to resolve
retain should resolved KinveyReferences be retained
Returns
  • Get object
Throws
IOException

public GetEntity getEntity (String entityID)

This method is deprecated.
Renamed to getEntityBlocking(String)

Method to get an entity or entities. Pass null to entityID to return all entities in a collection.

Parameters
entityID entityID to get
Returns
  • Get object
Throws
java.io.IOException
IOException

public GetEntity getEntityBlocking (String entityID)

Method to get an entity or entities. Pass null to entityID to return all entities in a collection.

Parameters
entityID entityID to get
Returns
  • Get object
Throws
IOException

public GetEntity getEntityBlocking (String entityID, String[] resolves, int resolve_depth, boolean retain)

Method to get an entity or entities. Pass null to entityID to return all entities in a collection.

Parameters
entityID entityID to get
resolves list of KinveyReference fields to resolve
resolve_depth the depth of KinveyReferences fields to resolve
retain should resolved KinveyReferences be retained
Returns
  • Get object
Throws
IOException

public Aggregate max (ArrayList<String> fields, String maxField, Query query)

This method is deprecated.
Renamed to maxBlocking(java.util.ArrayList, String, Query)

Retrieve a group by MAX on a collection or filtered collection@return

Parameters
fields fields to group by
maxField field to obtain max value from
query optional query to filter by (null for all records in a collection)
Throws
IOException
IOException

public Aggregate maxBlocking (ArrayList<String> fields, String maxField, Query query)

Retrieve a group by MAX on a collection or filtered collection@return

Parameters
fields fields to group by
maxField field to obtain max value from
query optional query to filter by (null for all records in a collection)
Throws
IOException

public Aggregate min (ArrayList<String> fields, String minField, Query query)

This method is deprecated.
Renamed to minBlocking(java.util.ArrayList, String, Query)

Retrieve a group by MIN on a collection or filtered collection@return

Parameters
fields fields to group by
minField field to obtain MIN value from
query optional query to filter by (null for all records in a collection)
Throws
IOException
IOException

public Aggregate minBlocking (ArrayList<String> fields, String minField, Query query)

Retrieve a group by MIN on a collection or filtered collection@return

Parameters
fields fields to group by
minField field to obtain MIN value from
query optional query to filter by (null for all records in a collection)
Throws
IOException

public Query query ()

Creates a new instance of Query

Returns
  • New instance of Query object.

public Save save (T entity)

This method is deprecated.
Renamed to saveBlocking(Object)

Save (create or update) an entity to a collection.

Parameters
entity Entity to Save
Returns
  • Save object
Throws
IOException
IOException

public Save saveBlocking (T entity)

Save (create or update) an entity to a collection.

Parameters
entity Entity to Save
Returns
  • Save object
Throws
IOException

public void setCache (Cache cache, CachePolicy policy)

Define a cache as well as the policy to use when interacting with the cache

Parameters
cache an implementation of the Cache interface, the cache itself
policy the policy defining behavior of the cache.

public void setCollectionName (String collectionName)

Sets the collectionName

Parameters
collectionName Name of the appData collection.

public Aggregate sum (ArrayList<String> fields, String sumField, Query query)

This method is deprecated.
Renamed to sumBlocking(java.util.ArrayList, String, Query)

Retrieve a group by SUM on a collection or filtered collection@return

Parameters
fields fields to group by
sumField field to sum
query optional query to filter by (null for all records in a collection)
Throws
IOException
IOException

public Aggregate sumBlocking (ArrayList<String> fields, String sumField, Query query)

Retrieve a group by SUM on a collection or filtered collection@return

Parameters
fields fields to group by
sumField field to sum
query optional query to filter by (null for all records in a collection)
Throws
IOException