@Test public void testAdd() { ParseObject parent = new ParseObject("Parent"); ParseRelation relation = new ParseRelation(parent, "key"); ParseObject object = new ParseObject("Test"); relation.add(object); assertEquals("Test", relation.getTargetClass()); assertTrue(relation.hasKnownObject(object)); ParseRelation relationInParent = parent.getRelation("key"); assertEquals("Test", relationInParent.getTargetClass()); assertTrue(relationInParent.hasKnownObject(object)); }
public void add(T object) { synchronized (mutex) { ParseRelationOperation<T> operation = new ParseRelationOperation<>(Collections.singleton(object), null); targetClass = operation.getTargetClass(); getParent().performOperation(key, operation); knownObjects.add(object); } }
ParseRelation implements Parcelable { public void add(T object) { synchronized (mutex) { ParseRelationOperation<T> operation = new ParseRelationOperation<>(Collections.singleton(object), null); targetClass = operation.getTargetClass(); getParent().performOperation(key, operation); knownObjects.add(object); } } }
ParseRelation implements Parcelable { public void add(T object) { synchronized (mutex) { ParseRelationOperation<T> operation = new ParseRelationOperation<>(Collections.singleton(object), null); targetClass = operation.getTargetClass(); getParent().performOperation(key, operation); knownObjects.add(object); } } ParseRelation(ParseObject parent, String key);   ParseRelation(String targetClass);   ParseRelation(JSONObject jsonObject, ParseDecoder decoder);   ParseRelation(Parcel source, ParseParcelDecoder decoder); }
ParseRelation implements Parcelable { public void add(T object) { synchronized (mutex) { ParseRelationOperation<T> operation = new ParseRelationOperation<>(Collections.singleton(object), null); targetClass = operation.getTargetClass(); getParent().performOperation(key, operation); knownObjects.add(object); } } ParseRelation(ParseObject parent, String key);   ParseRelation(String targetClass);   ParseRelation(JSONObject jsonObject, ParseDecoder decoder);   ParseRelation(Parcel source, ParseParcelDecoder decoder); void add(T object); void remove(T object); ParseQuery<T> getQuery(); @Override int describeContents(); @Override void writeToParcel(Parcel dest, int flags); }
ParseRelation implements Parcelable { public void add(T object) { synchronized (mutex) { ParseRelationOperation<T> operation = new ParseRelationOperation<>(Collections.singleton(object), null); targetClass = operation.getTargetClass(); getParent().performOperation(key, operation); knownObjects.add(object); } } ParseRelation(ParseObject parent, String key);   ParseRelation(String targetClass);   ParseRelation(JSONObject jsonObject, ParseDecoder decoder);   ParseRelation(Parcel source, ParseParcelDecoder decoder); void add(T object); void remove(T object); ParseQuery<T> getQuery(); @Override int describeContents(); @Override void writeToParcel(Parcel dest, int flags); final static Creator<ParseRelation> CREATOR; }