Android Open Source - Android.Parse Friend Parse






From Project

Back to project page Android.Parse.

License

The source code is released under:

MIT License

If you think the Android project Android.Parse listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.iamnbty.android.parse.parse;
//from w  ww.j  a va 2  s .  c  o  m
import com.parse.ParseObject;

public class FriendParse {

    public static final String PARSE_CLASS_NAME = "Friend";

    public String name;
    public String nickName;

    public ParseObject toParseObject() {
        ParseObject parseObject = new ParseObject(PARSE_CLASS_NAME);
        parseObject.put("name", name);
        parseObject.put("nickname", nickName);
        return parseObject;
    }

    public static FriendParse fromParseObject(ParseObject parseObject) {
        FriendParse friendParse = new FriendParse();

        if (parseObject.has("name")) {
            friendParse.name = parseObject.getString("name");
        }

        if (parseObject.has("nickname")) {
            friendParse.nickName = parseObject.getString("nickname");
        }

        return friendParse;
    }

}




Java Source Code List

com.iamnbty.android.parse.ApplicationTest.java
com.iamnbty.android.parse.BaseApplication.java
com.iamnbty.android.parse.activity.MainActivity.java
com.iamnbty.android.parse.fragment.AddFriendFragment.java
com.iamnbty.android.parse.fragment.ViewFriendsFragment.java
com.iamnbty.android.parse.parse.FriendParse.java