java.lang.Object |
↳ |
java.util.AbstractMap<K, V> |
|
↳ |
com.google.api.client.util.GenericData |
|
|
↳ |
com.google.api.client.json.GenericJson |
|
|
|
↳ |
com.kinvey.java.model.KinveyReference |
Class Overview
A KinveyReference allows for entities to include relational data from other collections and entities.
To use this class within an Entities' GenericJson implementation, just define a field's type as a KinveyReference.
Then, when, making a GET call through the AppData API various parameters can be used to specify how the backend should
handle these mappings.
The 'resolve' attribute can be passed a list of Strings containing all the KinveyReference fields that should be mapped.
The appropriate field in the Response Object should also be a KinveyReference,
but the relational mapping can be followed by accessing the returnObject field declared below.
'resolve_depth' is an int argument for GET requests through the AppData API, and will resolve all KinveyReferences up to N levels.
Keep in mind a KinveyReference.returnObject can contain other embedded KinveyReferences, and so on, allowing for multiple mappings
without explicitly declaring all fields.
`retain_references` is also supported, and can be used to pull the contents of returnObject up to replace the KinveyReference.
This flag defaults to true, but can be explicitly set to false if an end user only cares about the 'returnObject' value.
Summary
[Expand]
Inherited Methods |
From class
com.google.api.client.json.GenericJson
Object
|
clone()
|
final
JsonFactory
|
getFactory()
|
final
void
|
setFactory(JsonFactory arg0)
|
String
|
toPrettyString()
|
String
|
toString()
|
|
From class
com.google.api.client.util.GenericData
Object
|
clone()
|
Set<Entry<String, Object>>
|
entrySet()
|
final
Object
|
get(Object arg0)
|
final
ClassInfo
|
getClassInfo()
|
final
Map<String, Object>
|
getUnknownKeys()
|
final
Object
|
put(String arg0, Object arg1)
|
Object
|
put(Object arg0, Object arg1)
|
final
void
|
putAll(Map<? extends String, ?> arg0)
|
final
Object
|
remove(Object arg0)
|
GenericData
|
set(String arg0, Object arg1)
|
final
void
|
setUnknownKeys(Map<String, Object> arg0)
|
|
From class
java.util.AbstractMap
void
|
clear()
|
boolean
|
containsKey(Object arg0)
|
boolean
|
containsValue(Object arg0)
|
abstract
Set<Entry<K, V>>
|
entrySet()
|
boolean
|
equals(Object arg0)
|
V
|
get(Object arg0)
|
int
|
hashCode()
|
boolean
|
isEmpty()
|
Set<K>
|
keySet()
|
V
|
put(K arg0, V arg1)
|
void
|
putAll(Map<? extends K, ? extends V> arg0)
|
V
|
remove(Object arg0)
|
int
|
size()
|
String
|
toString()
|
Collection<V>
|
values()
|
|
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
java.util.Map
abstract
void
|
clear()
|
abstract
boolean
|
containsKey(Object arg0)
|
abstract
boolean
|
containsValue(Object arg0)
|
abstract
Set<Entry<K, V>>
|
entrySet()
|
abstract
boolean
|
equals(Object arg0)
|
abstract
V
|
get(Object arg0)
|
abstract
int
|
hashCode()
|
abstract
boolean
|
isEmpty()
|
abstract
Set<K>
|
keySet()
|
abstract
V
|
put(K arg0, V arg1)
|
abstract
void
|
putAll(Map<? extends K, ? extends V> arg0)
|
abstract
V
|
remove(Object arg0)
|
abstract
int
|
size()
|
abstract
Collection<V>
|
values()
|
|
Constants
public
static
final
String
USER_COLLECTION
Public Constructors
public
KinveyReference
()
public
KinveyReference
(String collectionName, String id)
Public Methods
public
String
getCollection
()
public
GenericJson
getReturnObject
()
public
void
setCollection
(String collection)
public
void
setId
(String id)
public
void
setReturnObject
(GenericJson returnObject)