| 构造器和说明 |
|---|
AVRelation() |
AVRelation(AVObject parent,
String key) |
AVRelation(String targetClass) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(T object)
Adds an object to this relation.
|
void |
addAll(Collection<T> objects)
Adds many objects to this relation.
|
String |
getKey() |
AVObject |
getParent() |
AVQuery<T> |
getQuery()
Gets a query that can be used to query the objects in this relation.
|
AVQuery<T> |
getQuery(Class<T> clazz)
Gets a query that can be used to query the subclass objects in this relation.
|
String |
getTargetClass() |
void |
remove(AVObject object)
Removes an object from this relation.
|
static <M extends AVObject> |
reverseQuery(Class<M> theParentClazz,
String relationKey,
AVObject child)
Create a query that can be used to query the parent objects in this relation.
|
static <M extends AVObject> |
reverseQuery(String parentClassName,
String relationKey,
AVObject child)
Create a query that can be used to query the parent objects in this relation.
|
void |
setKey(String key) |
void |
setParent(AVObject parent) |
void |
setTargetClass(String targetClass) |
public AVRelation()
public AVRelation(String targetClass)
public String getKey()
public void setKey(String key)
public AVObject getParent()
public void setParent(AVObject parent)
public String getTargetClass()
public void setTargetClass(String targetClass)
public void add(T object)
object - The object to add to this relation.public void addAll(Collection<T> objects)
objects - The objects to add to this relation.public void remove(AVObject object)
object - The object to remove from this relation.public AVQuery<T> getQuery()
public AVQuery<T> getQuery(Class<T> clazz)
clazz - The AVObject subclass.public static <M extends AVObject> AVQuery<M> reverseQuery(String parentClassName, String relationKey, AVObject child)
parentClassName - The parent class namerelationKey - The relation field key in parentchild - The child object.public static <M extends AVObject> AVQuery<M> reverseQuery(Class<M> theParentClazz, String relationKey, AVObject child)
theParentClazz - The parent subclass.relationKey - The relation field key in parentchild - The child object.Copyright © 2019. All rights reserved.