public class NCMBRelation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY_OP
key ob operation
|
static java.lang.String |
OP_ADD_RELATION
operation AddRelation
|
static java.lang.String |
OP_REMOVE_RELATION
operation RemoveRelation
|
static java.lang.String |
VAL_CLASS_ROLE
className of role
|
static java.lang.String |
VAL_CLASS_USER
className of user
|
static java.lang.String |
VAL_TYPE_POINTER
type of Pointer
|
Constructor and Description |
---|
NCMBRelation() |
Modifier and Type | Method and Description |
---|---|
static org.json.JSONObject |
addRelation(java.util.List<NCMBObject> objects)
Create JSONObject to add relation
|
static org.json.JSONArray |
addRole(org.json.JSONArray objects,
java.lang.String roleId)
Add role to relation array
|
static org.json.JSONArray |
addUser(org.json.JSONArray objects,
java.lang.String userId)
Add user to relation array
|
static org.json.JSONObject |
removeRelation(java.util.List<NCMBObject> objects)
Create JSONObject to remove relation
|
public static final java.lang.String KEY_OP
public static final java.lang.String OP_ADD_RELATION
public static final java.lang.String OP_REMOVE_RELATION
public static final java.lang.String VAL_TYPE_POINTER
public static final java.lang.String VAL_CLASS_USER
public static final java.lang.String VAL_CLASS_ROLE
public static org.json.JSONArray addUser(org.json.JSONArray objects, java.lang.String userId) throws org.json.JSONException
objects
- relation objects arrayuserId
- user idorg.json.JSONException
- exception from JSONObjectpublic static org.json.JSONArray addRole(org.json.JSONArray objects, java.lang.String roleId) throws org.json.JSONException
objects
- relation objects arrayroleId
- role idorg.json.JSONException
- exception from JSONObjectpublic static org.json.JSONObject addRelation(java.util.List<NCMBObject> objects) throws org.json.JSONException
objects
- relation objects arrayorg.json.JSONException
- exception from JSONObjectpublic static org.json.JSONObject removeRelation(java.util.List<NCMBObject> objects) throws org.json.JSONException
objects
- relation objects arrayorg.json.JSONException
- exception from JSONObject